GetLoginStateAppRoute: ((req, options) => {
    [key: string]: any;
})

Type declaration

    • (req, options): {
          [key: string]: any;
      }
    • Use this to store additional state for the user before they visit the identity provider to log in.

      // app/api/auth/[auth0]/route.js
      import { handleAuth, handleLogin } from '@auth0/nextjs-auth0';

      const getLoginState = (req, loginOptions) => {
      return { basket_id: getBasketId(req) };
      };

      export default handleAuth({
      login: handleLogin({ getLoginState })
      });

      Parameters

      Returns {
          [key: string]: any;
      }

      • [key: string]: any