AI-coded apps

    Does Bolt.new use secure session management?

    A 2026 audit view of a Bolt.new app's Supabase Auth session, showing a short-lived JWT access token and a rotating refresh token, with the token stored in the device Keychain rather than in plaintext

    When you ask whether Bolt.new uses secure session management, the precise answer is that Bolt.new does not manage sessions at all. It generates an app that leans on an auth provider, most often Supabase Auth, and that provider's session model is solid. The security you actually get depends on what the generated code does with it. Here is how to audit that.

    Short answer

    Bolt.new does not implement its own session system; it generates apps that use an auth provider, usually Supabase Auth, whose session model is secure by design: short-lived JWT access tokens, single-use rotating refresh tokens, reuse detection, and server-side revocation on logout. The real questions are where the generated app stores those tokens, since web localStorage is exposed to cross-site scripting and mobile tokens belong in the Keychain or Keystore, and whether data access is enforced by Row Level Security rather than by the session. A secure session does not protect data that RLS leaves open.

    What you should know

    • Bolt does not manage sessions: it generates code that uses a provider's auth, typically Supabase Auth.
    • The provider's model is sound: short-lived JWTs, single-use rotating refresh tokens, and reuse detection.
    • Token storage is the weak point: web localStorage is readable by XSS, and mobile tokens belong in secure storage.
    • The session is not authorization: Row Level Security, not a valid token, decides what data a user can read.
    • Validate tokens server-side: protected logic must verify the JWT, because client-side checks are bypassable.

    What session management does Bolt.new actually generate?

    It wires up the auth provider you asked for, rather than inventing its own. In practice that is usually Supabase Auth, where a signed-in user holds a JWT access token and a refresh token that the Supabase client manages for them. Bolt.new generates the calls to sign in, read the session, and attach the token to requests, but the session machinery, issuing tokens, expiring them, and refreshing them, belongs to Supabase. So auditing session security in a Bolt.new app means auditing how it uses Supabase Auth, not looking for a homegrown session system that is not there. This matters because the checks you would run on a custom session layer, such as looking for predictable session identifiers or missing expiry, mostly do not apply; the provider already handles those, and your attention belongs on configuration and storage instead.

    Is the underlying session model secure?

    Yes, the Supabase Auth model is well designed. Access tokens are short-lived JWTs, with a default expiry of one hour, and refresh tokens are single-use and rotate, so each refresh exchanges the pair for a new one. Supabase detects refresh-token reuse and revokes the whole session when an unauthorized reuse occurs, and signing out removes the affected sessions from the database entirely. Those are the properties you want from session management. The honest limit Supabase names is that single-use refresh tokens guard against a token leaking through logs, but not against a session stolen directly from a device, which is exactly why where the token is stored matters. It helps to separate the two halves: the token format and rotation are Supabase's responsibility and are sound, while the device the token sits on is yours, and that second half is the one a generated app most often gets wrong.

    Where do the real session risks live in a generated app?

    In the choices around the session, not in the token format. The table lists the concerns worth auditing and the secure pattern for each.

    Session concernInsecure defaultSecure pattern
    Token storage on weblocalStorage, readable by any XSSReduce XSS surface; use server-managed cookies where possible
    Token storage on mobileUnencrypted AsyncStorageKeychain on iOS, Keystore on Android, via secure storage
    AuthorizationTrusting the session or client-side checksRow Level Security enforced per user on the server
    Token validationChecked only in the clientValidate the JWT server-side on protected routes
    Session lifetimeA long-lived access tokenKeep the default one-hour expiry and single-use refresh

    The pattern across the table is that the session is only as safe as its storage and only as useful as the server-side rules behind it.

    How do you audit session management in a Bolt.new app?

    Check five things in order. First, where the access token is stored: on mobile it should be in the Keychain or Keystore, not plain AsyncStorage, and on web you should minimize what an XSS payload could read. Second, whether Row Level Security is enabled and enforced, because a valid session that can query every user's rows is the real failure. Third, whether protected operations validate the JWT server-side rather than trusting a client flag. Fourth, whether logout actually ends the session, which Supabase does by removing it server-side. Fifth, whether the access-token expiry is left at the sensible default rather than stretched to avoid refreshing. Each of these is a place a generated app can drift from the secure defaults.

    What to watch out for

    The biggest trap is the secure-session fallacy: assuming that because login works and tokens look right, the data is protected. It is not the session that protects your data, it is Row Level Security and server-side validation, so an app with flawless sessions and RLS disabled leaks everything to any valid user. On mobile specifically, the token has to live somewhere on the device, and a pre-submission scan such as PTKD.com (https://ptkd.com) reads the compiled APK, AAB, or IPA against OWASP MASVS to check whether the session token and keys are in secure storage rather than written in the clear. The limit is that a scan inspects the binary; the RLS and server-side checks still have to be verified against your backend.

    What to take away

    • Bolt.new does not manage sessions itself; it generates apps that use a provider, usually Supabase Auth, whose session model is secure by design.
    • The risks live in the implementation: token storage, whether Row Level Security enforces access, and server-side validation.
    • Store tokens in the Keychain or Keystore on mobile, and never treat a valid session as proof that data access is restricted.
    • Audit storage, RLS, server-side validation, logout, and expiry, and scan the binary with a pre-submission scan such as PTKD.com to confirm tokens are not stored in the clear.
    • #bolt-new
    • #session-management
    • #supabase-auth
    • #jwt
    • #token-storage
    • #rls
    • #owasp-masvs

    Frequently asked questions

    Does Bolt.new have its own session system?
    No. Bolt.new generates an app that uses an auth provider rather than managing sessions itself, and that provider is most often Supabase Auth. It writes the sign-in, session-read, and token-attachment code, but issuing, expiring, and refreshing tokens is handled by Supabase. So auditing session security means auditing how the generated app uses Supabase Auth, not searching for a homegrown session layer.
    Is Supabase Auth session management secure?
    The model is well designed. Access tokens are short-lived JWTs with a default one-hour expiry, refresh tokens are single-use and rotate, and Supabase detects refresh-token reuse and revokes the session when it sees unauthorized reuse. Signing out removes the session server-side. The limit Supabase notes is that single-use tokens do not protect a session stolen directly from a device, which is why secure token storage matters.
    Where should session tokens be stored?
    On mobile, in the Keychain on iOS or the Keystore on Android through secure storage, not in plain AsyncStorage where they can be extracted. On the web, avoid leaving access tokens in localStorage, which any cross-site scripting payload can read, and reduce your XSS surface or use server-managed cookies where the architecture allows. The token has to live somewhere, so put it in the most protected store available.
    If my session is secure, is my data safe?
    No. A secure session proves who the user is, but it does not decide what they can read. That is the job of Row Level Security and server-side validation. An app with flawless session handling and RLS disabled will return every user's data to any valid token. Treat session security and data authorization as two separate checks, and verify both before you ship.
    How do I audit session management in my app?
    Check five things: that the access token is stored in the Keychain or Keystore on mobile, that Row Level Security is enabled and enforced, that protected operations validate the JWT server-side rather than trusting a client flag, that logout actually ends the session, and that the access-token expiry is left at the sensible default. Each is a place a generated app can drift from the secure defaults.

    Keep reading

    Scan your app in minutes

    Upload an APK, AAB, or IPA. PTKD returns an OWASP-aligned report with copy-paste fixes.

    Try PTKD free