@@ -13,7 +13,7 @@ export default {
1313 storageType : 'localStorage' ,
1414 storageNamespace : 'vue-authenticate' ,
1515 cookieStorage : {
16- domain : window . location . hostname ,
16+ domain : typeof ( window ) === 'undefined' ? '' : window . location . hostname ,
1717 path : '/' ,
1818 secure : false
1919 } ,
@@ -55,7 +55,7 @@ export default {
5555 name : 'facebook' ,
5656 url : '/auth/facebook' ,
5757 authorizationEndpoint : 'https://www.facebook.com/v2.5/dialog/oauth' ,
58- redirectUri : window . location . origin + '/' ,
58+ redirectUri : typeof ( window ) === 'undefined' ? '/' : window . location . origin + '/' ,
5959 requiredUrlParams : [ 'display' , 'scope' ] ,
6060 scope : [ 'email' ] ,
6161 scopeDelimiter : ',' ,
@@ -68,7 +68,7 @@ export default {
6868 name : 'google' ,
6969 url : '/auth/google' ,
7070 authorizationEndpoint : 'https://accounts.google.com/o/oauth2/auth' ,
71- redirectUri : window . location . origin ,
71+ redirectUri : typeof ( window ) === 'undefined' ? '' : window . location . origin ,
7272 requiredUrlParams : [ 'scope' ] ,
7373 optionalUrlParams : [ 'display' ] ,
7474 scope : [ 'profile' , 'email' ] ,
@@ -83,7 +83,7 @@ export default {
8383 name : 'github' ,
8484 url : '/auth/github' ,
8585 authorizationEndpoint : 'https://github.com/login/oauth/authorize' ,
86- redirectUri : window . location . origin ,
86+ redirectUri : typeof ( window ) === 'undefined' ? '' : window . location . origin ,
8787 optionalUrlParams : [ 'scope' ] ,
8888 scope : [ 'user:email' ] ,
8989 scopeDelimiter : ' ' ,
@@ -95,7 +95,7 @@ export default {
9595 name : 'instagram' ,
9696 url : '/auth/instagram' ,
9797 authorizationEndpoint : 'https://api.instagram.com/oauth/authorize' ,
98- redirectUri : window . location . origin ,
98+ redirectUri : typeof ( window ) === 'undefined' ? '' : window . location . origin ,
9999 requiredUrlParams : [ 'scope' ] ,
100100 scope : [ 'basic' ] ,
101101 scopeDelimiter : '+' ,
@@ -107,7 +107,7 @@ export default {
107107 name : 'twitter' ,
108108 url : '/auth/twitter' ,
109109 authorizationEndpoint : 'https://api.twitter.com/oauth/authenticate' ,
110- redirectUri : window . location . origin ,
110+ redirectUri : typeof ( window ) === 'undefined' ? '' : window . location . origin ,
111111 oauthType : '1.0' ,
112112 popupOptions : { width : 495 , height : 645 }
113113 } ,
@@ -116,7 +116,7 @@ export default {
116116 name : 'bitbucket' ,
117117 url : '/auth/bitbucket' ,
118118 authorizationEndpoint : 'https://bitbucket.org/site/oauth2/authorize' ,
119- redirectUri : window . location . origin + '/' ,
119+ redirectUri : typeof ( window ) === 'undefined' ? '/' : window . location . origin + '/' ,
120120 optionalUrlParams : [ 'scope' ] ,
121121 scope : [ 'email' ] ,
122122 scopeDelimiter : ' ' ,
@@ -128,7 +128,7 @@ export default {
128128 name : 'linkedin' ,
129129 url : '/auth/linkedin' ,
130130 authorizationEndpoint : 'https://www.linkedin.com/oauth/v2/authorization' ,
131- redirectUri : window . location . origin ,
131+ redirectUri : typeof ( window ) === 'undefined' ? '' : window . location . origin ,
132132 requiredUrlParams : [ 'state' ] ,
133133 scope : [ 'r_emailaddress' ] ,
134134 scopeDelimiter : ' ' ,
@@ -141,7 +141,7 @@ export default {
141141 name : 'live' ,
142142 url : '/auth/live' ,
143143 authorizationEndpoint : 'https://login.live.com/oauth20_authorize.srf' ,
144- redirectUri : window . location . origin ,
144+ redirectUri : typeof ( window ) === 'undefined' ? '' : window . location . origin ,
145145 requiredUrlParams : [ 'display' , 'scope' ] ,
146146 scope : [ 'wl.emails' ] ,
147147 scopeDelimiter : ' ' ,
@@ -154,7 +154,7 @@ export default {
154154 name : null ,
155155 url : '/auth/oauth1' ,
156156 authorizationEndpoint : null ,
157- redirectUri : window . location . origin ,
157+ redirectUri : typeof ( window ) === 'undefined' ? '' : window . location . origin ,
158158 oauthType : '1.0' ,
159159 popupOptions : null
160160 } ,
@@ -163,7 +163,7 @@ export default {
163163 name : null ,
164164 url : '/auth/oauth2' ,
165165 clientId : null ,
166- redirectUri : window . location . origin ,
166+ redirectUri : typeof ( window ) === 'undefined' ? '' : window . location . origin ,
167167 authorizationEndpoint : null ,
168168 defaultUrlParams : [ 'response_type' , 'client_id' , 'redirect_uri' ] ,
169169 requiredUrlParams : null ,
0 commit comments