The explicit AmplifyContext whose auth providers are used.
Optionaloptions: FetchAuthSessionOptionsOptions configuring the fetch behavior.
Promise
AuthError - Throws error when session information cannot be refreshed.
Fetch the auth session including the tokens and credentials if they are available. By default it
will automatically refresh expired auth tokens if a valid refresh token is present. You can force a refresh
of non-expired tokens with { forceRefresh: true } input.
Optionaloptions: FetchAuthSessionOptionsOptions configuring the fetch behavior.
PromiseAmplify.configure() has run this
resolves with an empty session (all fields undefined), matching the
pre-context behavior.
AuthError - Throws error when session information cannot be refreshed.
Fetch the auth session of the given AmplifyContext — e.g. the per-request context handed to an SSR
runWithAmplifyServerContextoperation — instead of the global context. This restores the pre-context v6 SSR calling patternfetchAuthSession(contextSpec)(the deprecatedContextSpectype is an alias ofAmplifyContext, so existing SSR code compiles unchanged).