Type alias SvelteServerOptions

SvelteServerOptions: Partial<AuthorizationCodeProviderOptions> & {
    credentials?: AuthorizationCodeProvider;
    errorRedirect?: string;
    getIdToken?: ((token) => string);
    logIn?: string;
    logInRedirect?: string;
    logOut?: string;
    logOutRedirect?: string;
    sessionIdCookieName?: string;
    userInfoCallback?: ((this, token) => Promise<UserInfo>);
    userInfoCookieName?: string;
}

Type declaration

  • Optional credentials?: AuthorizationCodeProvider

    Authorization code provider to use to configure authentication.

  • Optional errorRedirect?: string

    The path to redirect the caller to after an error is encountered during the authorization flow.

  • Optional getIdToken?: ((token) => string)

    Retrieve the ID token. The default behavior is to use the access token. Some auth providers give separate id tokens and access tokens, in which case the access tokens are not jwts.

      • (token): string
      • Parameters

        Returns string

  • Optional logIn?: string

    The path which redirects the caller to the authorization url to sign in.

  • Optional logInRedirect?: string

    The path to redirect the caller to after signing in.

  • Optional logOut?: string

    The path to call to clear a user's session and revoke the access token.

  • Optional logOutRedirect?: string

    The path to redirect the caller to after signing out.

  • Optional sessionIdCookieName?: string

    The name of the cookie containing the session id so that AuthorizationCodeFlow can delete the session cookie when signing out.

    This must be the same as the value passed in to the @byu-oit-sdk/session-svelte constructor

  • Optional userInfoCallback?: ((this, token) => Promise<UserInfo>)

    Retrieve user information for a given request. The default behavior is to decode the token. The this context of the function is bound to your provider configuration.

  • Optional userInfoCookieName?: string

    The name of the cookie containing the user information parsed from the token.