Options
All
  • Public
  • Public/Protected
  • All
Menu

Auth utilities and a default auth implementation for use cases that use a login form and/or use the GQL API directly form teh client to login.

Index

Type Aliases

AuthTokens: { accessToken: string; refreshToken: string }

Type declaration

  • accessToken: string

    A bearer token to be passed in HTTP Authorization header

  • refreshToken: string

    A bearer token to be passed in HTTP Authorization header, only when requesting a new accessToken

Functions

  • This is the default implementation of the auth interface that uses local storage to store tokens and the refresh mutation to get new ones. This will work well when implementing a login page for auth.

    For other use cases, such as server side token exchange, you may need to supply a different implementation.

    Parameters

    Returns TokenAuthConfig<AuthTokens>

Variables

defaultTokenAuthConfig: TokenAuthConfig<AuthTokens> = ...

Generated using TypeDoc