Skip to content
Advertisement

Tag: authentication

No component being rendered on router.push(‘/page’) unless reloaded

On successful login, I’m embedding the user token in browser cookies and using router.push(‘/dashboard’) to take the user to his dashboard, but the ‘/dashboard’ page is not rendering any components unless I trigger a reload, on which all the components are rendered on the screen. Code block from /login page: Code block from /dashboard page: which on first returns a

Persist the login state in Next js using localstorage

I’m writing an authentication application in Next Js (v12.2.5). The application also uses React (v18.2.0). The problem is with persisting the authentication state. When the browser is refreshed, the login session is killed. Why is this happening even though I am getting and setting the token in the local storage. I would like to persist the login session to survive

How to get a “fido-u2f’ attestation fromat

I tried to create a basic webauthn implementation, using the “Web Authentication API” to use user’s biometric. There’s one thing I don’t get and I didn’t find the answer online, it is: Why do I get an attestation with a format set to ‘packed’ by default instead of ‘fido-u2f’ ? what am I doing wrong ? Here’s the “challenge” I

Next-Auth : How the registration is handled with a email + password credential provider?

How the registration is handled with a custom credential provider ( email + password)? Currently my […nextauth].js looks like this: All tutorials I found online only shows the login/signIn without details on how to implement registration Answer Registration is the process of registering the user, saving new users’ credentials into the database. It is independent of next-auth. You create a

Advertisement