supertokens / supertokens-node

Node SDK for SuperTokens core
https://supertokens.com
Other
278 stars 72 forks source link

feat: Add getInitialSessionAuthContext to compute SessionAuth context #785

Closed sasha240100 closed 5 months ago

sasha240100 commented 5 months ago

Summary of change

Adds getInitialSessionAuthContext to support computing initial SessionAuth context (to be used with initialSessionAuthContext property from https://github.com/supertokens/supertokens-auth-react/pull/789)

Related issues

Test Plan

Tested locally on a NextJS implementation using supertokens. getInitialSessionAuthContext(session) creates an SSR session context that works like expected when passed into initialSessionAuthContext={} of <SessionAuth /> component. Also covered by unit tests

Documentation changes

TODO.

(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)

Checklist for important updates

Remaining TODOs for this PR

netlify[bot] commented 5 months ago

Deploy Preview for astounding-pegasus-21c111 canceled.

Name Link
Latest commit 7de5b21f5742daf144928ef3cc8b7844a818a6f2
Latest deploy log https://app.netlify.com/sites/astounding-pegasus-21c111/deploys/65b388046570070008f245d4
netlify[bot] commented 5 months ago

Deploy Preview for precious-marshmallow-968a81 canceled.

Name Link
Latest commit 7de5b21f5742daf144928ef3cc8b7844a818a6f2
Latest deploy log https://app.netlify.com/sites/precious-marshmallow-968a81/deploys/65b388040816a70008aa421e