GabriFila
GabriFila
KKinde
Created by GabriFila on 8/9/2024 in #💻┃support
How can I let the user disable/unlink an MFA authenticator?
I have 2 scenarios in mind: 1. optional MFA - I setup optional MFA in the Kinde dashbord - a user sets up an authentication factor using an authenticator app - after a while the user wants to change authenticator, which requires to unlink the current one - how does the user unlinks the authenticator? 2. required MFA - I allows users to choose between 2 methods (one needs to be an authenticator app) - a user sets up the authenticator app - after a while the user wants to change factor, e.g. from authenticator to SMS unlinking the authenticator app - how does the user unlinks the authenticator? Thank you!
8 replies
KKinde
Created by GabriFila on 8/7/2024 in #💻┃support
New Expo SDK setup
Hello, I'm trying to setup a project with the latest Expo SDK (btw thanks for it) following what is in the README. This is pretty much the code
const Main = () => {
const { isAuthenticated, login } = useKindeAuth();

return (
<View>
<Text>isAuthenticated {String(isAuthenticated)}</Text>
<Button
title='Login'
onPress={async () => {
const token = await login();
console.log('LOGIN ERROR', token);
}}
/>
</View>
);
};

export default function RootLayout() {
return (
<KindeAuthProvider>
<Main />
</KindeAuthProvider>
);
}
const Main = () => {
const { isAuthenticated, login } = useKindeAuth();

return (
<View>
<Text>isAuthenticated {String(isAuthenticated)}</Text>
<Button
title='Login'
onPress={async () => {
const token = await login();
console.log('LOGIN ERROR', token);
}}
/>
</View>
);
};

export default function RootLayout() {
return (
<KindeAuthProvider>
<Main />
</KindeAuthProvider>
);
}
I'm using Android, when I try to run it in Expo Go I manage to login but when I try it in a development build (built with the latest dependancies) I get an error from the login method after redirecting from the browser to the app: {"errorMessage": "No discovery document", "success": false}. Also Expo Router logs the warning once redirecting from the browser back to the appThe navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration. which I believe it is related to some missing paths that need to be configured but could have nothing to do with Kinde. Am I missing something? Do I need to include other environment variables except those mentioned in the docs (EXPO_PUBLIC_KINDE_DOMAIN,EXPO_PUBLIC_KINDE_CLIENT_ID,EXPO_PUBLIC_KINDE_SCOPES)? Do I need to include other paths? I found other issues with using the SDK on the web but I'd first like to solve the ones I mentioned for Thanks for any help, we'd really love to use Kinde with Expo so if you need any other info please let me know
3 replies