Welcome to the Kinde community

Updated 3 months ago

Prompt Request Parameter: Using Kinde without SDK

From the documentation, the prompt parameter accepts a login or a registration value to determine if your user should land on the sign up or sign in page. Assigning "login" to the prompt parameter works as expected but assigning "register" to the prompt parameter throws the error in the image on the screen.
Attachment
image.png
O
N
v
12 comments
Hi @NanaGaisie,
Thanks for reaching out.
register is indeed not a valid value for the prompt parameter.
I would suggest try using the registration value.

Please let me know if you are still having issues.
Giving it a registration registration value gives the error
Hey @NanaGaisie,
Sorry to hear you are still experiencing issues.
I will discuss this with my team and get back to you.
Hi @Oli - Kinde,
No problem. Looking forward to your team's insights.
Hi @NanaGaisie,
Are you able to explain a bit more about what you are trying to achieve?
What is your tech stack? Is there a specific reason you are using Kinde without an SDK?
Hi @Oli - Kinde,
My strategy is to use NextAuth with Kinde as a custom provider for syncing user data across Kinde and my database. Given the absence of explicit documentation on syncing created users with webhooks in Kinde, this approach provides a flexible solution. It allows me to seamlessly integrate authentication while ensuring effective data synchronization with my database.
Hi @NanaGaisie, sorry to hear you're having trouble with the prompt req param - is there any code you'd be able to share + would you be able to print out your entire auth url ie https://domain.com/oauth2/auth?.... so we can take a deeper look & troubleshoot further? Could you also see if start_page is working for you? Thank you ☺️ !
Hi @viv (kinde),
I have below the entire auth url and code for kinde as a custom oauth provider with next auth.

Plain Text
https://<SUBDOMAIN>.kinde.com/oauth2/auth?response_type=code&client_id=<CLIENT_ID>&redirect_uri=https%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth%2Fcallback%2Fkinde-register&scope=openid+email+profile+offline&state=QCql6gPlaQrhXlgMLmwcXGMIDojecTh4okfTH%2B9x%2BZg%3D&prompt=registration&code_challenge=hQWse3RIXTo7wfpLzb1z7RmkGe85n9GBmtQNFpQD1SE&code_challenge_method=S256


Plain Text
Typescript 
{
      id: "kinde-register",
      name: "Kinde Provider",
      type: "oidc",
      issuer: process.env.KINDE_ISSUER_URL,
      clientId: process.env.KINDE_CLIENT_ID,
      clientSecret: process.env.KINDE_CLIENT_SECRET,
      wellKnown: process.env.KINDE_CLIENT_WELLKNOWN,
      authorization: {
        params: {
          response_type: "code",
          scope: "openid email profile offline",
          state: process.env.AUTH_SECRET,
          prompt: "registration",
        },
      },
      profile(profile) {
        return {
          id: profile.sub,
          name: profile.name,
          email: profile.email,
          image: profile.picture,
        };
      },
    },
Thanks for sending that over @NanaGaisie ! I think I've found something on our side that may be causing that - raising a PR now, will keep you updated! (for now, start_page rather than prompt should be working). Thank you!!
Alright @viv (kinde), thank you for your support.
Please feel free to reach out if you run into anything else, otherwise I'll message back here when prompt is working as expected - thank you for your patience ☺️ !
Add a reply
Sign up and join the conversation on Discord