What is Supabase Auth and how do its users and sessions work?
Published on 2026-10-20 by frfrand
Supabase Auth explained: login, registration, JWT, sessions, refresh token, account recovery, and relationship with RLS policies.

Short answer: Supabase Auth is the Supabase service that helps register users, verify their identity, and maintain sessions within an application. It allows implementing methods such as email and password, magic links, and certain external providers without writing the entire authentication mechanism from scratch.
But beware: authenticating is not the same as authorizing. Knowing who a person is does not mean they have permission to query all the data in your project.
The library example
Imagine a library with membership cards. Showing the card allows staff to know who you are, but that does not mean you can open the administration cabinet or take a book reserved for someone else.
In an application something similar happens: login identifies the user; authorization rules decide what data and operations they can access.
Supabase Auth provides pieces for the first part and integrates with PostgreSQL capabilities, such as RLS, to support the second.
What happens when someone logs in?
In a typical flow, the client sends credentials to an authentication service. If they are verified, it can receive session data and tokens that it will use in subsequent requests.
Supabase uses JWT, or JSON Web Tokens, to represent certain identity and session information. A signed JWT allows the receiver to verify its validity following the system rules.
The token should not be confused with a password nor with a guarantee that any request is authorized. Its issuer, validity, signature, and expected properties must also be validated.
What is an access token?
It is a credential that the client uses during a limited period to demonstrate that it has a valid session.
When an application makes a request to Supabase services, libraries can manage sending the corresponding token.
The server or database uses that identity within its authorization mechanisms. For example, an RLS policy can allow the person to consult only their own reservations.
And the refresh token?
It is used to request new access credentials without asking the user for their password in each operation.
The duration, renewal, and revocation of sessions depend on the configuration. It is not advisable to copy values from an old guide without reviewing the documentation of the current version.
It is also necessary to decide what happens when logging out, changing the password, or detecting a compromised device.
Where are tokens stored?
It depends on the architecture. A browser application, a mobile app, and a traditional backend do not necessarily have to manage sessions in the same way.
Storing credentials in places accessible to JavaScript involves considerations regarding XSS attacks. Using cookies also requires studying attributes, origin policies, and protection against certain unwanted requests.
What matters is choosing a recommended pattern for your framework and understanding its risks, not moving tokens from one place to another because a tutorial said it is "more secure".
What is a magic link?
Instead of entering a traditional password, the user receives an access link sent to their email. The system validates that link under defined conditions.
It is convenient, but security depends heavily on the email account and on how links are protected and expired. If someone controls the person's email, they may try to exploit recovery or access methods.
Does Supabase Auth replace all user logic?
Not necessarily. It can manage identity and sessions, while your application maintains profiles, preferences, commercial roles, and other tables.
It is not advisable to use the authentication system's internal tables directly as if they were your complete business model. Follow the supported mechanisms to link identities with application data.
How does RLS intervene?
When a request arrives with a verified identity, PostgreSQL can apply policies that limit visible or modifiable rows.
A read policy does not automatically protect all operations. SQL permissions and privileged keys must also be reviewed. In particular, never publish administrative secrets on the frontend.
When is it worth using Supabase Auth?
It is useful if your application already works with the Supabase ecosystem and needs login, sessions, and data access permissions.
If you have a complete backend with a consolidated user system, it may be better to integrate that system instead of maintaining two unnecessary identity sources.
And in ArduMaker?
If you host your own backend or PostgreSQL databases on ArduMaker VPS, you implement authentication with the tool you choose for your architecture. The PostgreSQL installed from the ArduMaker app catalog is the standard engine: it does not include Supabase Auth or functions like auth.uid(). Supabase Auth is a separate service, not a function that should be assumed available by default in any PostgreSQL.
In summary: Supabase Auth solves much of the authentication; your application still needs authorization, secure sessions, and correct permission design.
Frequently asked questions
How long does a Supabase access token last?
By default, one hour, and it can be configured in the project. When it expires, client libraries use the refresh token to request a new one without the person having to log in again. Check the current value in the Supabase session documentation before relying on it.
Can I use Supabase Auth with my own backend?
Yes. Your backend can receive the access token from the client and verify the JWT (signature, issuer, expiration, and audience) before handling the request. This way you reuse Supabase login even if the business logic lives on another server.
Sources: Supabase Auth Documentation · Supabase Sessions · JWT in Supabase.
