File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,12 @@ function ControllerHome(
3838
3939 dataHome . data . hasPass = ! ! $location . search ( ) . password ;
4040
41+ if ( $location . search ( ) . auth ) {
42+ verifyUserIsAuth ( true ) ;
43+ }
4144 $scope . goToInstance = verifyUserIsAuth ;
4245
43- function verifyUserIsAuth ( ) {
46+ function verifyUserIsAuth ( authed ) {
4447 async . series ( [
4548 function ( cb ) {
4649 fetchUser ( function ( err , user ) {
@@ -53,11 +56,11 @@ function ControllerHome(
5356 function sendUserSomewhere ( cb ) {
5457
5558 var thisUser = $scope . user ;
56-
59+ var opts = authed ? { location : 'replace' } : null ;
5760 $state . go ( 'instance.home' , {
5861 userName : keypather . get ( $localStorage , 'stateParams.userName' ) ||
5962 thisUser . oauthName ( )
60- } ) ;
63+ } , opts ) ;
6164 return cb ( ) ;
6265
6366 }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ function configLoginURL(
88 configAPIHost
99) {
1010 return function ( ) {
11- var redirect = encodeURI ( $window . location . protocol + '//' + $window . location . host ) ;
11+ var redirect = encodeURI ( $window . location . protocol + '//' + $window . location . host + '/?auth' ) ;
1212 return configAPIHost + '/auth/github?redirect=' + redirect ;
1313 } ;
1414}
You can’t perform that action at this time.
0 commit comments