Skip to content

Commit

Permalink
test: run examples for version 5.3.0-alpha.8 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyiming0803 committed Sep 8, 2023
1 parent 2ea69e3 commit 9cb42b0
Show file tree
Hide file tree
Showing 11 changed files with 278 additions and 87 deletions.
42 changes: 21 additions & 21 deletions examples/guard-angular/normal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/guard-angular/normal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@angular/platform-browser": "^14.0.0",
"@angular/platform-browser-dynamic": "^14.0.0",
"@angular/router": "^14.0.0",
"@authing/guard-angular": "^5.3.0-alpha.7",
"@authing/guard-angular": "^5.3.0-alpha.8",
"face-api.js": "^0.22.2",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,7 @@

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

<button class="authing-button" (click)="checkLoginStatus()">Check Login Status</button>

<div id="authing-guard-container"></div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,9 @@ export class EmbedComponent {
})
console.log('getAccessTokenByIdToken: ', res)
}

async checkLoginStatus () {
const res = await this.guard.client.checkLoginStatus()
console.log('checkLoginStatus: ', res)
}
}
42 changes: 21 additions & 21 deletions examples/guard-react18/normal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/guard-react18/normal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"webpack-merge": "^4.2.1"
},
"dependencies": {
"@authing/guard-react18": "^5.3.0-alpha.7",
"@authing/guard-react18": "^5.3.0-alpha.8",
"antd": "^4.24.0",
"face-api.js": "^0.22.2",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/guard-react18/normal/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function App() {
return (
<>
<GuardProvider
appId="AUTHING_APP_ID"
appId="630ed3137dd6f2fd7001da24"

// 如果你使用的是私有化部署的 Authing 服务,需要传入自定义 host,如:
// host="https://my-authing-app.example.com"
Expand Down
7 changes: 7 additions & 0 deletions examples/guard-react18/normal/src/pages/Embed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ export default function Embed() {
console.log('getAccessTokenByIdToken: ', res)
}

const checkLoginStatus = async () => {
const res = await guard.checkLoginStatus()
console.log('checkLoginStatus: ', res)
}

return <div>
<select value={langCache} onChange={changeLang}>
<option value="zh-CN">zh-CN</option>
Expand All @@ -138,6 +143,8 @@ export default function Embed() {

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

<button className='authing-button' onClick={checkLoginStatus}>Check Login Status</button>

<button className='authing-button' onClick={checkAllAgreements}>Check All Agreements</button>

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

0 comments on commit 9cb42b0

Please sign in to comment.