Skip to content

What is the difference between auth.session and auth.currentSession? #554

@sarperdag

Description

@sarperdag

I can't seem to understand what the difference is between

let client = SupabaseClient(...)
let session = try await client.auth.session

and
client.auth.currentSession

When I do a signout, looks like currentSession is nilled but client.auth.session is not. It's still live and it's got a refreshToken etc that I can use to refresh the session if I need to. Shouldn't calling signout() be invalidating client.auth.session too like it invalidates client.auth.currentSession?

I'm confused... Which one should I be referring to?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions