0.0.25-alpha • Published 3 years ago

@keebesports/keebe-auth-next v0.0.25-alpha

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

KeebeSports auth for nextjs

  • The component depends on
    • tailwindcss
  1. Init auth config in _app.tsx

    import { initAuth } from "keebe-auth-next";

    initAuth();

  2. Use AuthProvider in app.tsx

  1. Use the useSession hook to evaluate if the user is authenticated

const {loading, session} = useSession;

  1. Also you can use the Authorized component
  • your are logged
  • you can access to the session object (session)=> user: session.user.email

There is a complete example in the app folder