[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:
Wyatt Johnson
2019-07-05 21:49:41 +00:00
committed by GitHub
parent 0754ceb803
commit da1fa9c9fc
12 changed files with 2018 additions and 1807 deletions
@@ -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
}
`
)(