Skip to content

[Auth Docs] onAuthStateChange return value #20966

@galaxyblur

Description

@galaxyblur

Improve documentation

Link

https://supabase.com/docs/reference/javascript/auth-onauthstatechange

Describe the problem

The return value for onAuthStateChange shows the variable as a direct reference to the Subscription object, in order to call unsubscribe() later. The return value is actually { data: { subscription } }.

Describe the improvement

Update code example to show the correct return value.

Additional context

Add any other context or screenshots that help clarify your question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions