Skip to content

Commit 683ab5d

Browse files
Merge pull request #246 from Authing/fix-trackSession-20230721
Fix track session 20230721
2 parents 506bd29 + cfd8c04 commit 683ab5d

22 files changed

Lines changed: 99 additions & 76 deletions

File tree

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

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

examples/guard-nextjs-react18/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@authing/guard-react18": "^5.2.2-alpha.0",
12+
"@authing/guard-react18": "^5.2.3-alpha.0",
1313
"@types/node": "18.11.9",
1414
"@types/react": "18.0.24",
1515
"@types/react-dom": "18.0.8",

examples/guard-nextjs-react18/pages/index.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
import Head from 'next/head'
22

3+
import { useEffect } from 'react'
4+
5+
import { Guard } from '@authing/guard-react18'
6+
7+
import { guardOptions } from '../config'
8+
39
export default function Home () {
10+
const guard = new Guard(guardOptions)
411
const toEmbed = () => window.location.href = '/login'
512
const toJump = () => window.location.href = '/jump'
613

14+
useEffect(() => {
15+
guard.trackSession().then(userInfo => {
16+
console.log('userInfo in index trackSession: ', userInfo)
17+
})
18+
}, [])
19+
720
return <div>
821
<div style={{marginBottom: '20px'}} onClick={toEmbed}><button>嵌入模式</button></div>
922
<div><button onClick={toJump}>跳转模式</button></div>

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

Lines changed: 23 additions & 23 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.2.1",
27+
"@authing/guard-react18": "^5.2.3-alpha.0",
2828
"antd": "^4.24.0",
2929
"face-api.js": "^0.22.2",
3030
"react": "^18.2.0",

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"packages/*"
55
],
66
"useWorkspaces": true,
7-
"version": "5.2.2"
7+
"version": "5.2.3-alpha.0"
88
}

packages/guard-angular/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/guard-angular/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@authing/guard-angular",
3-
"version": "5.2.2",
3+
"version": "5.2.3-alpha.0",
44
"description": "Guard for Angular",
55
"module": "dist/fesm2015/authing-guard-angular.mjs",
66
"types": "dist/index.d.ts",
@@ -33,7 +33,7 @@
3333
"@angular/core": "^14.0.0"
3434
},
3535
"dependencies": {
36-
"@authing/guard": "^5.2.2"
36+
"@authing/guard": "^5.2.3-alpha.0"
3737
},
3838
"author": "https://github.com/authing",
3939
"license": "MIT",

packages/guard-react/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/guard-react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@authing/guard-react",
3-
"version": "5.2.2",
3+
"version": "5.2.3-alpha.0",
44
"description": "Guard for React",
55
"module": "dist/esm/guard.min.js",
66
"types": "dist/typings/index.d.ts",
@@ -24,7 +24,7 @@
2424
"webpack": "^5.72.0"
2525
},
2626
"dependencies": {
27-
"@authing/guard": "^5.2.2",
27+
"@authing/guard": "^5.2.3-alpha.0",
2828
"react": "^16.13.1"
2929
},
3030
"author": "https://github.com/authing",

0 commit comments

Comments
 (0)