Skip to content

Commit 1fef2bd

Browse files
author
Timothy E. Johansson
committed
PhoneGap/iOS fix
1 parent 9990c59 commit 1fef2bd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

angularjs.userapp.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,11 @@ var userappModule = angular.module('UserApp', []);
878878
var defaultRedirectUrl = window.location.protocol+'//'+window.location.host+window.location.pathname+getHashMode()+'/oauth/callback/';
879879
var redirectUri = 'uaOauthRedirectUri' in attrs ? attrs.uaOauthRedirectUri : defaultRedirectUrl;
880880

881+
// PhoneGap/iOS fix
882+
if (redirectUri.indexOf('file://') == 0) {
883+
redirectUri = 'https://oauth.userapp.io/';
884+
}
885+
881886
UserApp.OAuth.getAuthorizationUrl({ provider_id: providerId, redirect_uri: redirectUri, scopes: scopes }, function(error, result) {
882887
if (error) {
883888
$timeout(function() {

0 commit comments

Comments
 (0)