Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
AI & KI NachrichtenAI Security Testing: How to Red Team an LLM Application(29.09.2026 um 07:39 Uhr)
•
IT Security NachrichtenKann die E-Rechnung wirklich gegen Umsatzsteuerbetrug helfen?(29.09.2026 um 07:22 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/shared/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/llms/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/agents/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/core/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/sdk/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
••••
AI & KI NachrichtenAI Security Testing: How to Red Team an LLM Application(29.09.2026 um 07:39 Uhr)
•
IT Security NachrichtenKann die E-Rechnung wirklich gegen Umsatzsteuerbetrug helfen?(29.09.2026 um 07:22 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/shared/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/llms/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/agents/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/core/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
•
IT Security DownloadsGitHub Release: cline/cline vsdk/sdk/v0.0.87 (29.09.2026)(29.09.2026 um 07:30 Uhr)
••••
Intelligence View
⚡ tsecurity.de Intelligence

How to Change a Logged-In User’s Password and Log Out All Active Sessions in Supabase

Changing Password Supabase provides a built-in functionality for resetting passwords via a link. However, if you want to change your password while logged in, there is no built-in functionality for this scenario. To handle this, you can…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

  1. Changing Password
    Supabase provides a built-in functionality for resetting passwords via a link. However, if you want to change your password while logged in, there is no built-in functionality for this scenario. To handle this, you can use a custom function on Supabase.



Run the following code in your Supabase SQL Editor:




create or replace function changepassword("current_plain_password" text, "new_plain_password" text, "current_id" uuid)
returns varchar
language plpgsql
security definer
as $$
DECLARE
encpass auth.users.encrypted_password%type;
BEGIN
SELECT encrypted_password
FROM auth.users
INTO encpass
WHERE id = current_id and encrypted_password = crypt(current_plain_password, auth.users.encrypted_password);

-- Check the currect password and update
IF NOT FOUND THEN
return 'incorrect';
else
UPDATE auth.users SET encrypted_password = crypt(new_plain_password, gen_salt('bf')) WHERE id = current_id;
return 'success';
END IF;

END;
$$






This will create a custom function that you can call from any platform. Here’s the syntax for Javascript:




const { data, error } = await supabase.rpc('changepassword', {
current_plain_password: oldPassword,
new_plain_password: newPassword,
current_id: currentUserId
});






Here-



current_plain_password is the old password



new_plain_password is the new password



current_id is the id in the current session of the app.

That function returns incorrect if the password is wrong, success if the password is correct and the function updates correctly the password.




  1. Logging Out from Active Sessions on Other Browsers/Devices
    To sign out from all active sessions, you can use the following commands:




// defaults to the global scope
await supabase.auth.signOut()

// sign out from the current session only
await supabase.auth.signOut({ scope: 'local' })

// sign out from the other session without the current
await supabase.auth.signOut({ scope: 'others' })
Upon sign out, all refresh tokens and potentially other database objects related to the affected sessions are destroyed and the client library removes the session stored in the local storage medium.


Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Change a Logged-In User’s Password and Log Out All Active Sessions in Supabase

Thematisch verwandte Begriffe: Change, LoggedIn, Users, Password · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-102367 | mall4j through 4.0 contains an insufficient session expiration vulnerab…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag