-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS is not sign in due to URL scheme #156
Comments
Still no fix? @eduardocalixtokorp |
I'll check it soon in 3.0.6 version (currently using 3.0.5). I was able to make it work by doing a workaround, which uses |
I am also facing the same issue. plugin overriding the applicationOpenURLSourceApplicationAnnotation method. I have changed manually but still its not redirected back to authenticate page applicationOpenURLSourceApplicationAnnotation(app: UIApplication, url: NSURL, sourceApp: string, annotation: any): boolean {
@eduardocalixtokorp Could you please provide the workaround? |
It's something like this: import { AppURL, handleOpenURL } from 'nativescript-urlhandler';
// ...
var iosOauthRedirectFn: (url: string) => void;
handleOpenURL((appURL: AppURL) => {
if (isIOS && iosOauthRedirectFn) {
iosOauthRedirectFn(appURL.toString());
}
});
// ...
iosOauthRedirectFn = ((url) => {
if (this.oauthClient?.resumeWithUrl) {
this.oauthClient.resumeWithUrl(url);
}
});
this.oauthClient.loginWithCompletion(completion); Notice that you should follow nativescript url handler guide |
Thanks @eduardocalixtokorp. It works! Life saver :) |
I wasn't able to get nativescript-urlhandler working on NativeScript 8. Is there another work around for this? |
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
Only Sign in using iOS
After the login process is finished, the oauth server returns to
<REDIRECT>://auth
, but nativescript-oauth2 doesn't recognize the returned value. This way app keeps in the login page (from oauth server).PS: completion never calls it back, but IOS app selection pop-up is showed.
PS 2: I was able to identify the problem using nativescript-urlhandler package, with the same config it was able to return the returned url, containing all needed query params such as code
Is there any code involved?
loginWithCompletion call
Info.plist
The text was updated successfully, but these errors were encountered: