Cannot read property 'authorize' of undefined
See original GitHub issueI get TypeError: Cannot read property 'authorize' of undefined with this setup
import { authorize as auth } from 'react-native-app-auth';
const config = {
clientId: 'app-id',
clientSecret: 'super-secret',
redirectUrl: 'com.app://redirect',
scopes: ['activity', 'sleep'],
serviceConfiguration: {
authorizationEndpoint: 'https://domain/authorize',
tokenEndpoint: 'https://domain.tld/token',
revocationEndpoint: 'https://domain.tld/revoke'
}
};
auth(config).then(result => {
console.log(result);
}).catch(e => {
console.error(e);
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Cannot read property 'authorize' of undefined in Google Oauth?
My problem is: I can not login by google account and it show error : Uncaught TypeError: Cannot read property 'authorize' of undefined...
Read more >Error while Authorizing an ORG using VS Code Cannot read ...
SFDX-Authorize Org. when i try to i get error. enter image description here Cannot read properties of undefined (reading ...
Read more >cannot read properties of undefined (reading 'authorization')
There are 3 main reasons the "Cannot read properties of undefined" error occurs: Accessing a property on a variable that stores an undefined...
Read more >Trello Authorize cannot read properties of undefined error
I am using the window.Trello.authorize() to receive authorization from the user to perform Trello actions on their behalf. I followed this setup ...
Read more >Day 4 Authorization - Submit call test failing with "TypeError ...
I have folder level authorization type API Key with my ... call test failing with "TypeError: Cannot read property 'type' of undefined".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any update on this? I am still facing the issue on IOS simulator. I have tried everything mentioned in this thread still no success
I encountered the same error as mentioned here when I try to load an app for a Windows app. (return RNAppAuth.authorize(…nativeMethodArguments); “TypeError: Cannot read properties of undefined”). I tried the linking process but it is intended only for Android and iPhone; as seen below. Does somebody know if there is an easy fix for a Windows app ?
I use react-native-app-auth@6.4.1.
npx react-native link react-native-app-auth npm WARN config global
--global,--localare deprecated. Use--location=globalinstead. warn Calling react-native link [packageName] is deprecated in favor of autolinking. It will be removed in the next major release. Autolinking documentation: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md info Linking “react-native-app-auth” iOS dependency info iOS module “react-native-app-auth” has been successfully linked info Linking “react-native-app-auth” Android dependency info Android module “react-native-app-auth” has been successfully linked