Skip to content

Commit 9cb42b0

Browse files
test: run examples for version 5.3.0-alpha.8 🚀
1 parent 2ea69e3 commit 9cb42b0

11 files changed

Lines changed: 278 additions & 87 deletions

File tree

examples/guard-angular/normal/package-lock.json

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/guard-angular/normal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@angular/platform-browser": "^14.0.0",
2020
"@angular/platform-browser-dynamic": "^14.0.0",
2121
"@angular/router": "^14.0.0",
22-
"@authing/guard-angular": "^5.3.0-alpha.7",
22+
"@authing/guard-angular": "^5.3.0-alpha.8",
2323
"face-api.js": "^0.22.2",
2424
"rxjs": "~7.5.0",
2525
"tslib": "^2.3.0",

examples/guard-angular/normal/src/app/pages/embed/embed.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,7 @@
2121

2222
<button class="authing-button" (click)="getAccessTokenByIdToken()">Get Access Token By Id Token</button>
2323

24+
<button class="authing-button" (click)="checkLoginStatus()">Check Login Status</button>
25+
2426
<div id="authing-guard-container"></div>
2527
</div>

examples/guard-angular/normal/src/app/pages/embed/embed.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,9 @@ export class EmbedComponent {
8787
})
8888
console.log('getAccessTokenByIdToken: ', res)
8989
}
90+
91+
async checkLoginStatus () {
92+
const res = await this.guard.client.checkLoginStatus()
93+
console.log('checkLoginStatus: ', res)
94+
}
9095
}

examples/guard-react18/normal/package-lock.json

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/guard-react18/normal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"webpack-merge": "^4.2.1"
2525
},
2626
"dependencies": {
27-
"@authing/guard-react18": "^5.3.0-alpha.7",
27+
"@authing/guard-react18": "^5.3.0-alpha.8",
2828
"antd": "^4.24.0",
2929
"face-api.js": "^0.22.2",
3030
"react": "^18.2.0",

examples/guard-react18/normal/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default function App() {
1414
return (
1515
<>
1616
<GuardProvider
17-
appId="AUTHING_APP_ID"
17+
appId="630ed3137dd6f2fd7001da24"
1818

1919
// 如果你使用的是私有化部署的 Authing 服务,需要传入自定义 host,如:
2020
// host="https://my-authing-app.example.com"

examples/guard-react18/normal/src/pages/Embed.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ export default function Embed() {
118118
console.log('getAccessTokenByIdToken: ', res)
119119
}
120120

121+
const checkLoginStatus = async () => {
122+
const res = await guard.checkLoginStatus()
123+
console.log('checkLoginStatus: ', res)
124+
}
125+
121126
return <div>
122127
<select value={langCache} onChange={changeLang}>
123128
<option value="zh-CN">zh-CN</option>
@@ -138,6 +143,8 @@ export default function Embed() {
138143

139144
<button className='authing-button' onClick={getAccessTokenByIdToken}>Get Access Token By ID Token</button>
140145

146+
<button className='authing-button' onClick={checkLoginStatus}>Check Login Status</button>
147+
141148
<button className='authing-button' onClick={checkAllAgreements}>Check All Agreements</button>
142149

143150
<button className='authing-button' onClick={unCheckAllAgreements}>Uncheck All Agreements</button>

0 commit comments

Comments
 (0)