mirror of
https://github.com/wassname/talk.git
synced 2026-09-12 13:01:11 +08:00
[CORL-437] SSO Token Documentation + Updates (#2390)
* feat: updated README, added more SSO functionality * fix: lint * fix: lint * fix: lint * fix: typos
This commit is contained in:
@@ -19,6 +19,7 @@ it("renders fully", () => {
|
||||
},
|
||||
accessToken: "access-token",
|
||||
accessTokenJTI: "JTI",
|
||||
accessTokenExp: 1562172094,
|
||||
},
|
||||
viewer: null,
|
||||
settings: {
|
||||
@@ -77,6 +78,7 @@ it("renders without logout button", () => {
|
||||
},
|
||||
accessToken: "access-token",
|
||||
accessTokenJTI: null,
|
||||
accessTokenExp: null,
|
||||
},
|
||||
viewer: null,
|
||||
settings: {
|
||||
@@ -135,6 +137,7 @@ it("renders sso only", () => {
|
||||
},
|
||||
accessToken: "access-token",
|
||||
accessTokenJTI: "JTI",
|
||||
accessTokenExp: 1562172094,
|
||||
},
|
||||
viewer: null,
|
||||
settings: {
|
||||
@@ -193,6 +196,7 @@ it("renders sso only without logout button", () => {
|
||||
},
|
||||
accessToken: "access-token",
|
||||
accessTokenJTI: "JTI",
|
||||
accessTokenExp: 1562172094,
|
||||
},
|
||||
viewer: null,
|
||||
settings: {
|
||||
@@ -251,6 +255,7 @@ it("renders without register button", () => {
|
||||
},
|
||||
accessToken: "access-token",
|
||||
accessTokenJTI: "JTI",
|
||||
accessTokenExp: 1562172094,
|
||||
},
|
||||
viewer: null,
|
||||
settings: {
|
||||
|
||||
@@ -46,7 +46,9 @@ export class UserBoxContainer extends Component<Props> {
|
||||
|
||||
private get supportsLogout() {
|
||||
return Boolean(
|
||||
!this.props.local.accessToken || this.props.local.accessTokenJTI
|
||||
!this.props.local.accessToken ||
|
||||
(this.props.local.accessTokenJTI !== null &&
|
||||
this.props.local.accessTokenExp !== null)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -129,6 +131,7 @@ const enhanced = withSignOutMutation(
|
||||
}
|
||||
accessToken
|
||||
accessTokenJTI
|
||||
accessTokenExp
|
||||
}
|
||||
`
|
||||
)(
|
||||
|
||||
Reference in New Issue
Block a user