K
Kinde6mo ago
TEKIMAX

Unable to Complete Login Process - Authentication Error

I'm reaching out for assistance with an issue I'm encountering during the login process. I've successfully navigated through the authentication steps and reached the point where I'm verified with a confirmation code. However, I'm unable to complete the login process due to an error that appears post-redirect. The error message displayed is: "ERROR: Something wrong when trying to authenticate. Reason: cancel" This issue prevents me from accessing my account, and it occurs right after the verification step. It seems like the authentication process gets cancelled unexpectedly. Could you please provide guidance or a solution to resolve this issue? Thank you for your time and assistance. here is the code snippet--
/** @format */

import { useState, useEffect, useContext, createContext } from "react";
import { KindeSDK } from "@kinde-oss/react-native-sdk-0-7x";
import * as AuthSession from "expo-auth-session";

// Initialize the Kinde SDK client
const client = new KindeSDK(
process.env.EXPO_PUBLIC_KINDE_ISSUER_URL ?? "",
process.env.EXPO_PUBLIC_KINDE_POST_CALLBACK_URL ?? "",
process.env.EXPO_PUBLIC_KINDE_CLIENT_ID ?? "",
process.env.EXPO_PUBLIC_KINDE_POST_LOGOUT_REDIRECT_URL ?? ""
);


function useProvideAuth() {
const [user, setUser] = useState(null);

const signIn = async () => {
const token = await client.login();
try {
if (token) {
// Update user state
setUser({ token });
console.log(token);
}
} catch (e) {
console.log(e);
}
};
.....
/** @format */

import { useState, useEffect, useContext, createContext } from "react";
import { KindeSDK } from "@kinde-oss/react-native-sdk-0-7x";
import * as AuthSession from "expo-auth-session";

// Initialize the Kinde SDK client
const client = new KindeSDK(
process.env.EXPO_PUBLIC_KINDE_ISSUER_URL ?? "",
process.env.EXPO_PUBLIC_KINDE_POST_CALLBACK_URL ?? "",
process.env.EXPO_PUBLIC_KINDE_CLIENT_ID ?? "",
process.env.EXPO_PUBLIC_KINDE_POST_LOGOUT_REDIRECT_URL ?? ""
);


function useProvideAuth() {
const [user, setUser] = useState(null);

const signIn = async () => {
const token = await client.login();
try {
if (token) {
// Update user state
setUser({ token });
console.log(token);
}
} catch (e) {
console.log(e);
}
};
.....
No description
5 Replies
Oli - Kinde
Oli - Kinde6mo ago
Hi @Christian Kaman, I have passed this question onto my React Native expert teammate. I will get back to you very soon.
TEKIMAX
TEKIMAX6mo ago
Thank you
Oli - Kinde
Oli - Kinde6mo ago
Hi @Christian Kaman, Are you using React Native with Expo? or just React Native?
TEKIMAX
TEKIMAX6mo ago
Expo
Oli - Kinde
Oli - Kinde6mo ago
Thanks for getting back to me so quickly @Christian Kaman. We have just deployed an update the Kinde React Native SDK v1.2.2 . Can you please update to the latest version and please check if your issue still exists.