K
Kinde2mo ago
Tito

How to show signup page with expo-starter-kit?

At https://github.com/kinde-starter-kits/expo-starter-kit/blob/main/app/index.tsx , the button below sends to the login page.
<Button
title="Login"
onPress={() => {
authenticate({ prompt: "login" });
}}
/>
<Button
title="Login"
onPress={() => {
authenticate({ prompt: "login" });
}}
/>
I tried to redirect instead to the signup / create account page by changing the prompt to register and signup but it didn't work. What should I do to redirect customers to signup instead of login? Or even better, is there an agnostic page that simply signs in if the account (email) exists and signs up if account (email) doesn't exist?
GitHub
expo-starter-kit/app/index.tsx at main · kinde-starter-kits/expo-st...
Contribute to kinde-starter-kits/expo-starter-kit development by creating an account on GitHub.
12 Replies
Ages - Kinde
Ages - Kinde2mo ago
Hi Tito Thanks for reach out. Could you confirm which version of the SDK you're using?
Tito
TitoOP2mo ago
This is all i am using (basically taking from expo-starter-kit):
"@kinde/js-utils": "^0.7.1",
"@kinde/jwt-validator": "^0.4.0",
"expo-auth-session": "~6.0.3",
"expo-web-browser": "~14.0.2",
"@kinde/js-utils": "^0.7.1",
"@kinde/jwt-validator": "^0.4.0",
"expo-auth-session": "~6.0.3",
"expo-web-browser": "~14.0.2",
React Native SDK didn't work for me on expo (i think due to encrypted storage conflict in expo) and the expo sdk isn't really functional yet and didn't work for me. If I use prompt: "signup", it still goes to the same login page. If I use prompt: "register", it shows an error on the landing page.
Ages - Kinde
Ages - Kinde2mo ago
Hi Tito, Thanks for providing the details. Let me replicate this issue on my end and see if I can reproduce the behavior. I'll get back to you with an update. In the meantime, could you confirm if you're using a custom authorization URL in your Kinde settings? Sometimes, the prompt values depend on how the authentication flow is configured on Kinde's side.
Tito
TitoOP2mo ago
i don't know what a custom authorization URL is, i am running something very close to the expo-starter-kit streckenheld.kinde.com is my endpoint
Ages - Kinde
Ages - Kinde2mo ago
Hi Tito, In the meantime please consider one of these approaches: 1. Build a lightweight custom signup screen in your app. Once the user enters their email (and other details), call Kinde’s signup API directly. This way, you bypass the limitations of the current expo-starter-kit implementation. 2. You could implement a combined flow where the user enters their email, and your app checks whether the account exists—proceeding with login if it does, or initiating signup if it doesn’t. This pattern isn’t provided out-of-the-box in the current starter kit but can be developed as a temporary workaround. Please let me know if you continue to face this issue or need further assistance with a custom implementation.
Tito
TitoOP2mo ago
I will build the email field in the app (for "magic link" signup) and just link to social logins. Would you guide me to the right API to use to signup. Is this the Kinde Management API that I would call from the server? or is there a call I can make from the app directly passing the email?
Tito
TitoOP2mo ago
For example, if I create an user passing their email as identity using the Kinde Management API (https://docs.kinde.com/kinde-apis/management/#tag/users/post/api/v1/user), will it trigger the OTP email?
Kinde docs
Kinde Management API
The management API is for managing your Kinde account. Most things that can be done via the Kinde admin UI can be done with this API
Ages - Kinde
Ages - Kinde2mo ago
Hi Tito, Thanks for the question. When you use the Kinde Management API to create a user (for example, by posting their email as the identity), it will create the user account but will not automatically trigger the OTP (magic link) email. The OTP sending is part of our authentication flow and is handled separately. To implement a “magic link” signup experience, we recommend the following workflow: 1. Build a lightweight email entry field in your app. 2. On your backend, check if the user exists. If not, use the Management API to create the user. 3. Once the user exists, explicitly trigger the magic link (OTP) process via our authentication endpoints. This step is necessary because the Management API call only creates or updates the user—it does not initiate the sign-in flow. In short, the Management API itself won’t send the OTP email; you’ll need to trigger the authentication (magic link) flow separately after ensuring the user exists. I hope this clarifies the process. Please let me know if you have any further questions or need additional guidance.
Tito
TitoOP2mo ago
Is there any way to open the "signup" page rather than the "login" page as expected? I have the Apple app store release stuck on this error (they click on signup button with prompt: "signup" but the signup fails on "account doesn't exist") I see that the URL being opened is with both login and signup is https://streckenheld.kinde.com/auth/cx/_:nav&m:login&psid:019570278efe85f5f2c1c5b0e3d82c5b in order to register, the url should be https://streckenheld.kinde.com/auth/cx/_:nav&m:register&psid:019570278efe85f5f2c1c5b0e3d82c5b Might it be that there is confusion in mapLoginMethodParamsForUrl between prompt: "signup" (that sends to m:login) and prompt: "register" (which gives an error instead of sending to m:register which would solve the problem)? It looks to me that the prompt parameter is simply ignored when passed to
const request = new AuthRequest({
clientId: process.env.EXPO_PUBLIC_KINDE_CLIENT_ID!,
redirectUri,
scopes: ['openid','profile','email','offline'],
responseType: "code",
// prompt: options.prompt,
extraParams: {
has_success_page: "true",
// prompt: options.prompt,
prompt: "register"
// ...mapLoginMethodParamsForUrl(options)
},
});
const request = new AuthRequest({
clientId: process.env.EXPO_PUBLIC_KINDE_CLIENT_ID!,
redirectUri,
scopes: ['openid','profile','email','offline'],
responseType: "code",
// prompt: options.prompt,
extraParams: {
has_success_page: "true",
// prompt: options.prompt,
prompt: "register"
// ...mapLoginMethodParamsForUrl(options)
},
});
Ages - Kinde
Ages - Kinde2mo ago
Hi Tito, Based on what you’ve described, it appears that the current implementation in expo-starter-kit isn’t dynamically applying the prompt parameter as expected. The hardcoded value in the extraParams (i.e., setting prompt to "register") is causing the URL to default to the login route (m:login) regardless of the prompt value you pass in. Here are a couple of suggestions in the meantime: • One workaround is to implement a lightweight email entry field in your app. On the backend, check if the user exists. Then, trigger the appropriate flow: login if the user exists or the sign-up (magic link) process if they don’t.
• If you’re comfortable with making adjustments, you might look into modifying the SDK implementation (specifically the mapLoginMethodParamsForUrl function) to properly map the prompt parameter to the correct endpoint (m:register) for the registration flow.

Let me know how it goes and feel free if you have any further questions
Tito
TitoOP2mo ago
Changing the mapLoginMethodParamsForUrl won't do anything, you see that I commented it out and passed the prompt directly, still doesn't work or in other words, what am I supposed to pass to new AuthRequest to get the right url m:register I found the issue! You should pass prompt: "create" to AuthRequest (not register, not signup). From the expo sdk I found a reference to a PromptTypes type in js-utils:
export enum PromptTypes {
none = "none",
create = "create",
login = "login",
}
export enum PromptTypes {
none = "none",
create = "create",
login = "login",
}
Ages - Kinde
Ages - Kinde2w ago
Hi Tito, Thank you for your effort in troubleshooting this. I’ll pass this feedback along to our engineering team for further review. I’ll get back to you once I have more information. Please let me know if you have any further questions or need additional assistance. Hi Tito, I’ve confirmed with our team that we’re currently in the process of updating the Expo Starter Kit to use the latest version of our SDK. This update is expected to address prompt handling more robustly—including the ability to correctly trigger the signup page using prompt: "create". While we’re not able to provide an immediate fix just yet, please rest assured that this is actively in progress. We’ll let you know as soon as the updated starter kit is available so you can take advantage of the improved functionality. If you need a temporary workaround or want to explore alternative options in the meantime, I’m happy to help with that too. Let me know how you’d like to proceed, and I’ll keep you posted on any developments from our side.

Did you find this page helpful?