Ios app auth crashes when it comes to authorize
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 15/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, react-native
- Domain
- authentication, mobile
Research direction
Start by reproducing the iOS login flow around the shown authorize({ ...Config, connectionTimeoutSeconds: 5, iosPrefersEphemeralSession: true }) call. Confirm the identity provider, iOS platform details, React Native and react-native-app-auth versions, and the crash output; done means the authorization flow no longer crashes and the relevant error is covered.
Written by the indexing model from the issue text.
Description
Issue
---login: async () => {
console.log("AAD injected sign in");
console.log("Config:", Config);
try {
console.log(authorize, "Attempting to authorize...");
const payload = await authorize({
...Config,
connectionTimeoutSeconds: 5,
iosPrefersEphemeralSession: true,
});//await authorize(Config);
console.log("Authorization successful:", payload);
if (payload?.accessToken) {
console.log("Storing access token...");
await AsyncStorage.setItem('accessToken', payload.accessToken);
}
if (payload?.refreshToken) {
console.log("Storing refresh token...");
await AsyncStorage.setItem('refreshToken', payload.refreshToken);
}
console.log("Returning payload...");
return payload;
} catch (error) {
console.error("Error during login:", error);
throw error;
}
},
logout: async () => {
console.log("AAD injected sign out");
authorize(LogoutConfig);
return Promise.resolve();
},
refreshToken: async () => {
const refreshToken = await AsyncStorage.getItem('refreshToken');
if (refreshToken) {
const payload = await refresh(Config, {
refreshToken
});
await AsyncStorage.setItem('accessToken', payload?.accessToken);
await AsyncStorage.setItem('refreshToken', payload?.refreshToken);
console.log("refreshToken", payload);
return payload;
} else {
return Promise.resolve();
}
},
getToken: async () => {
return AsyncStorage.getItem('accessToken')
}
Environment
- Your Identity Provider:
e.g. Ping fed - Platform that you're experiencing the issue on:
iOS / Android / both - Your
react-nativeVersion:e.g. 0.69.12 - Your
react-native-app-authVersion:e.g. 8.0.2 - Are you using Expo? no
- Dominant language
- Java
- Stars
- 2.3k
- Forks
- 473
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FormidableLabs/react-native-app-auth
-
Difficulty 4/5 3-5 days Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
FormidableLabs/react-native-app-auth#1108 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
All issues in FormidableLabs/react-native-app-auth
Similar issues
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
inu-appcenter/memorIN-backend#288 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
frontend maui-pilot pilot-ask question
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
area/plugin
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kestra-io/plugin-kestra#190 ·