在我的项目中,我已将包“react-native-app-auth”与 strava 集成以进行身份验证。
const openStravaApp = async () => {
const config = {
clientId: '62069',
clientSecret: '795dad2fc3d5f3ec9277b6a84f1f49cd7dcb324e',
redirectUrl: 'com.exam://com.exam',
serviceConfiguration: {
authorizationEndpoint: 'https://www.strava.com/oauth/mobile/authorize',
tokenEndpoint:
'https://www.strava.com/oauth/token?client_id=62069&client_secret=795dad2fc3d5f3ec9277b6a84f1f49cd7dcb324e',
},
scopes: ['activity:read_all'],
};
const result = await authorize(config);
};