@auth0/nextjs-auth0
Version:
Auth0 Next.js SDK
21 lines (20 loc) • 999 B
TypeScript
import { SessionData, TokenSet } from "../types/index.js";
/**
* Determines the necessary changes to the session after obtaining a new access token.
*
* This function checks if the provided tokenSet corresponds to the global audience and scope
* or a specific one. It then determines if any updates are needed in the session's tokenSet
* or accessTokens array and returns the required changes.
*
* If no changes are needed, it returns undefined.
* @param session The original session data
* @param tokenSet The, potentially, new TokenSet obtained
* @param globalOptions The global audience and scope configured for the Auth0Client
* @returns Partial session changes or undefined if no changes are needed
*/
export declare function getSessionChangesAfterGetAccessToken(session: SessionData, tokenSet: TokenSet, globalOptions: {
scope?: string | null | undefined | {
[key: string]: string;
};
audience?: string | null | undefined;
}): Partial<SessionData> | undefined;