[Question] Android: My own providers are not supported yet?
See original GitHub issueI’ve implemented iOS app for my own oauth provider with rn-oauth. It works as I expected.
But on Android, it doesn’t.
I got following error on OAuthManager#authorize()
.
04-09 22:22:55.143 5149 5189 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.github.scribejava.core.oauth.OAuth20Service.getAuthorizationUrl()' on a null object reference
So I read some code, found this static method, and it seems additional providers are not cosidered on Android.
static public OAuth20Service getApiFor20Provider(
final String providerName,
final HashMap params,
@Nullable final ReadableMap opts,
final String callbackUrl
) {
if (providerName.equalsIgnoreCase("facebook")) {
return OAuthManagerProviders.facebookService(params, opts, callbackUrl);
} else if (providerName.equalsIgnoreCase("google")) {
return OAuthManagerProviders.googleService(params, opts, callbackUrl);
} else if (providerName.equalsIgnoreCase("github")) {
return OAuthManagerProviders.githubService(params, opts, callbackUrl);
} else if (providerName.equalsIgnoreCase("slack")) {
return OAuthManagerProviders.slackService(params, opts, callbackUrl);
} else {
return null;
}
}
Not supported yet on Android ? Or there is the way to get my own provider work?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:11 (9 by maintainers)
Top Results From Across the Web
My application relies Google play services, which is not ...
Possible solution: Make sure you are using the latest version of Google Play Service & most importantly your Play Services isn't disabled.
Read more >Fix an installed Android app that isn't working - Google Support
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >Device compatibility overview - Android Developers
As an app developer, you don't need to worry about whether a device is Android compatible, because only devices that are Android compatible...
Read more >Frequently asked questions | Android Open Source Project
This page provides answers to some frequently asked questions (FAQs). Open Source. What is the Android Open Source Project?
Read more >Content provider basics | Android Developers
This topic covers the basics of working with existing content providers. To learn more about implementing content providers in your own ...
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 FreeTop 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
Top GitHub Comments
Thank you vbuch, your code almost works! I’ll continue to try detailed test.
The problem is solved in accessTokenResponse of OAuthManagerModule.java: