ory / kratos-selfservice-ui-react-nextjs

A full reference implementation for designing your own login, registration, recovery, verification, ... pages using Ory Kratos' APIs.
https://www.ory.sh/
Apache License 2.0
135 stars 56 forks source link

Request; Being able to register a new account while being logged in #42

Closed adharshmk96 closed 1 year ago

adharshmk96 commented 2 years ago

Currently I can only reach the registration page If A session isn't there or not logged in.

I would like to be able to work with registration even when I'm logged in

When I reach the registration page after logging in, the SDK, I'm getting this error response when I'm into registration flow.

 {
    "error":{
       "id":"session_already_available",
       "code":400,
       "status":"Bad Request",
       "reason":"A valid session was detected and thus registration is not possible.",
       "message":"you are already logged in"
    }
 }

Example: Google allows us to sign up even though we are logged in.

aeneasr commented 2 years ago

You will need to log out first! Then you can sign up :)

adharshmk96 commented 2 years ago

@aeneasr Yeah, I'm looking for a way to be able to sign up without logging out.

Basically I'm trying to have a system like google accounts where you can log in to a google account, and still register for a new one. then, maybe login to another account too and have an account switcher

aeneasr commented 2 years ago

I see, that's unfortunately not currently possible - you can't register with an existing session :/