File tree Expand file tree Collapse file tree
guard-angular/normal/src/app/pages/callback
guard-nextjs-react18/pages
guard-react18/normal/src/pages
guard-react/normal/src/pages
guard-vue2/normal/src/views
guard-vue3/normal/src/views Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,10 +28,7 @@ export class CallbackComponent {
2828 const loginStatus : JwtTokenStatus | undefined = await this . guard . client . checkLoginStatus ( )
2929
3030 if ( ! loginStatus ) {
31- this . guard . client . startWithRedirect ( {
32- scope : 'openid profile'
33- } )
34- return
31+ return console . error ( 'Guard is not get login status' )
3532 }
3633
3734 // 3. 获取到登录用户的用户信息
@@ -53,9 +50,7 @@ export class CallbackComponent {
5350 // 从 URL search 中解析 state
5451 } catch ( e ) {
5552 // 登录失败,推荐再次跳转到登录页面
56- this . guard . client . startWithRedirect ( {
57- scope : 'openid profile'
58- } )
53+ console . error ( 'Guard handleAuthingLoginCallback error: ' , e )
5954 }
6055 }
6156}
Original file line number Diff line number Diff line change @@ -19,10 +19,7 @@ export default function Callback() {
1919 const loginStatus = await guard . checkLoginStatus ( )
2020
2121 if ( ! loginStatus ) {
22- guard . startWithRedirect ( {
23- scope : 'openid profile'
24- } )
25- return
22+ return console . error ( 'Guard is not get login status' )
2623 }
2724
2825 // 3. 获取到登录用户的用户信息
@@ -42,9 +39,7 @@ export default function Callback() {
4239 // 从 URL search 中解析 state
4340 } catch ( e ) {
4441 // 登录失败,推荐再次跳转到登录页面
45- guard . startWithRedirect ( {
46- scope : 'openid profile'
47- } )
42+ console . error ( 'Guard handleAuthingLoginCallback error: ' , e )
4843 }
4944 }
5045
Original file line number Diff line number Diff line change @@ -19,10 +19,7 @@ export default function Home() {
1919 const loginStatus = await guard . checkLoginStatus ( )
2020
2121 if ( ! loginStatus ) {
22- guard . startWithRedirect ( {
23- scope : 'openid profile'
24- } )
25- return
22+ return console . error ( 'Guard is not get login status' )
2623 }
2724
2825 // 3. 获取到登录用户的用户信息
@@ -42,9 +39,7 @@ export default function Home() {
4239 // 从 URL search 中解析 state
4340 } catch ( e ) {
4441 // 登录失败,推荐再次跳转到登录页面
45- guard . startWithRedirect ( {
46- scope : 'openid profile'
47- } )
42+ console . error ( 'Guard handleAuthingLoginCallback error: ' , e )
4843 }
4944 }
5045
Original file line number Diff line number Diff line change @@ -17,10 +17,7 @@ export default function Callback() {
1717 const loginStatus : JwtTokenStatus | undefined = await guard . checkLoginStatus ( )
1818
1919 if ( ! loginStatus ) {
20- guard . startWithRedirect ( {
21- scope : 'openid profile'
22- } )
23- return
20+ return console . error ( 'Guard is not get login status' )
2421 }
2522
2623 // 3. 获取到登录用户的用户信息
@@ -40,9 +37,7 @@ export default function Callback() {
4037 // 从 URL search 中解析 state
4138 } catch ( e ) {
4239 // 登录失败,推荐再次跳转到登录页面
43- guard . startWithRedirect ( {
44- scope : 'openid profile'
45- } )
40+ console . error ( 'Guard handleAuthingLoginCallback error: ' , e )
4641 }
4742 }
4843
Original file line number Diff line number Diff line change @@ -17,10 +17,7 @@ export default function Callback() {
1717 const loginStatus : JwtTokenStatus | undefined = await guard . checkLoginStatus ( )
1818
1919 if ( ! loginStatus ) {
20- guard . startWithRedirect ( {
21- scope : 'openid profile'
22- } )
23- return
20+ return console . error ( 'Guard is not get login status' )
2421 }
2522
2623 // 3. 获取到登录用户的用户信息
@@ -40,9 +37,7 @@ export default function Callback() {
4037 // 从 URL search 中解析 state
4138 } catch ( e ) {
4239 // 登录失败,推荐再次跳转到登录页面
43- guard . startWithRedirect ( {
44- scope : 'openid profile'
45- } )
40+ console . error ( 'Guard handleAuthingLoginCallback error: ' , e )
4641 }
4742 }
4843
Original file line number Diff line number Diff line change @@ -26,10 +26,7 @@ export default {
2626 const loginStatus = await this .$guard .checkLoginStatus ()
2727
2828 if (! loginStatus) {
29- this .$guard .startWithRedirect ({
30- scope: ' openid profile'
31- })
32- return
29+ return console .error (' Guard is not get login status' )
3330 }
3431
3532 // 3. 获取到登录用户的用户信息
@@ -49,9 +46,7 @@ export default {
4946 // 从 URL search 中解析 state
5047 } catch (e) {
5148 // 登录失败,推荐再次跳转到登录页面
52- this .$guard .startWithRedirect ({
53- scope: ' openid profile'
54- })
49+ console .error (' Guard handleAuthingLoginCallback error: ' , e)
5550 }
5651 }
5752 }
Original file line number Diff line number Diff line change @@ -25,10 +25,7 @@ const handleAuthingLoginCallback = async () => {
2525 const loginStatus: JwtTokenStatus | undefined = await guard .checkLoginStatus ()
2626
2727 if (! loginStatus ) {
28- guard .startWithRedirect ({
29- scope: ' openid profile'
30- })
31- return
28+ return console .error (' Guard is not get login status' )
3229 }
3330
3431 // 3. 获取到登录用户的用户信息
@@ -50,9 +47,7 @@ const handleAuthingLoginCallback = async () => {
5047 // 从 URL search 中解析 state
5148 } catch (e ) {
5249 // 登录失败,推荐再次跳转到登录页面
53- guard .startWithRedirect ({
54- scope: ' openid profile'
55- })
50+ console .error (' Guard handleAuthingLoginCallback error: ' , e )
5651 }
5752}
5853
Original file line number Diff line number Diff line change 2727 const loginStatus = await guard . checkLoginStatus ( )
2828
2929 if ( ! loginStatus ) {
30- guard . startWithRedirect ( {
31- scope : 'openid profile'
32- } )
33- return
30+ return console . error ( 'Guard is not get login status' )
3431 }
3532
3633 // 3. 获取到登录用户的用户信息
5047 // 从 URL search 中解析 state
5148 } catch ( e ) {
5249 // 登录失败,推荐再次跳转到登录页面
53- guard . startWithRedirect ( {
54- scope : 'openid profile'
55- } )
50+ console . error ( 'Guard handleAuthingLoginCallback error: ' , e )
5651 }
5752 }
5853 </ script >
You can’t perform that action at this time.
0 commit comments