8000 Change redirect URI to be relative for demoing. · angular-oauth/angular-oauth@e118bf3 · GitHub
[go: up one dir, main page]

Skip to content

Commit e118bf3

Browse files
committed
Change redirect URI to be relative for demoing.
This would allow me to serve a mirror of the code and add it as a redirect URI to demo it over.
1 parent a6035a6 commit e118bf3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

example/js/demo.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ angular.module('demo', ['googleOauth']).
66
config(function(TokenProvider) {
77
// Demo configuration for the "angular-oauth demo" project on Google.
88
// Log in at will!
9+
10+
// Sorry about this way of getting a relative URL, powers that be.
11+
var baseUrl = document.URL.replace('example/demo.html', '');
12+
913
TokenProvider.extendConfig({
1014
clientId: '191261111313.apps.googleusercontent.com',
11-
redirectUri: 'http://localhost:9000/src/oauth2callback.html',
15+
redirectUri: baseUrl + 'src/oauth2callback.html', // allow lunching demo from a mirror
1216
scopes: ["https://www.googleapis.com/auth/userinfo.email"]
1317
});
1418
}).

0 commit comments

Comments
 (0)
0