Expo Access Token Authority
I'm currently using the Expo SDK and it works great. My only issue is that I can't find a way to provide an authority (or list of authorities) to ensure we retrieve an access token for a registered API. The Expo config only has these values (KindeAuthProvider.tsx):
type KindeAuthConfig = {
domain: string | undefined;
clientId: string | undefined;
scopes?: string;
enhancedSecurity?: boolean;
};
The React Native SDK does have a way to provide a list of authorities when creating the SDK object. Am I going to have to switch to that SDK or am I missing something in the Expo SDK?2 Replies
Hi, @Joel
how are you today?
Hi Joel,
The Expo SDK for Kinde currently exposes the following configuration fields in the KindeAuthProvider:
At this time, there is no option in the Expo SDK to provide an authority or list of authorities (such as an audience/API identifier) as part of the config. All authentication requests are scoped through the scopes parameter only, and there’s no documented way to specify a custom audience/authority in Expo.
The React Native SDK does support this use case explicitly, as it allows you to pass an audience/authority when initializing the SDK.
If your integration requires passing an audience/authority to ensure tokens are issued for a particular API, the current approach would be to use the React Native SDK instead of the Expo SDK.
We’re tracking requests to expand the Expo SDK configuration and have noted your use case. Anyhow, I’ll confirm with the team and let you know if there are any changes.
References:
Expo SDK docs
Expo SDK GitHub
React Native SDK docs
GitHub
expo/readme.md at main · kinde-oss/expo
Library to integrate Kinde into an Expo project. Contribute to kinde-oss/expo development by creating an account on GitHub.
Kinde docs
Expo
Complete guide for Expo SDK including authentication setup, token utilities, user profile management, and mobile app integration for React Native applications.
Kinde docs
React Native SDK
Comprehensive guide for React Native SDK including Android/iOS setup, native linking, Expo compatibility, and mobile authentication integration.