Skip to content

Update supabase-js v2 setSession() example #633

@Aerilym

Description

@Aerilym

Improve documentation

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

Describe the problem

The example given is inaccurate and doesn't work with the current version of supabase-js. This has been discussed and mentioned in:
gotrue-js PR473
gitrue-js PR511

Describe the improvement

Update the example to use the refresh token and access token in an object.

supabase.auth.setSession({
      refresh_token
      access_token
    });

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