I’m building a RN Android app for https://dashboard.wikiedu.org/ . Users can login/signup ONLY with their wikipedia.org sign-on credentials. Right now, I’m using the example from Expo’s Authsession and have used my ClientID from OKTA (I have one from Auth0 as well) When ‘registering’ my app at mediawiki . org/wiki/MediaWiki I received a Consumer Token and a Secret Token. I’m not sure what I need to replace the AuthURL in the example code with. Also, not sure what I can do with the Consumer Token and a Secret Token. This is the endpoint FROM WikiEDU that redirects TO Wikipedia: /users/auth/mediawiki. I’ve used a Chrome generated URL in the Expo example and it works where it take me to Wikipedia, but once I authenticate at Wikipedia, I don’t get redirected back to WikiEDU. Any advice what I need to change/create for the redirect / token handling to work?
Here is my code for the button press:
_handlePressAsync = async () => {
let redirectUrl = AuthSession.getRedirectUrl();
let result = await AuthSession.startAsync({
authUrl:
https://en.wikipedia.org/w/index.php?title=Special%3AOAuth%2Fauthorize&oauth_consumer_key=28113b40587f3b91b6ce559da734e78c&oauth_token=d41578b5f31f1184d39b3521cbd257a9
+
&client_id=${FB_APP_ID}
+
&redirect_uri=${encodeURIComponent(redirectUrl)}
,
});
this.setState({ result });
};
}
The FB_APP_ID is one generated from OKTA (I’ve tried the one from Auth0 too with no success)