@imposium-hub/components 1.34.3 → 1.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,7 @@ export interface IAppWrapperProps {
13
13
  children : React.ReactChildren;
14
14
  auth0ClientId : string;
15
15
  organizationId : string;
16
+ baseUrl : string;
16
17
  storyId? : string;
17
18
  serviceId : number;
18
19
  access : any;
@@ -145,7 +146,7 @@ class AppWrapper extends React.Component<IAppWrapperProps, IAppWrapperState> {
145
146
  Check auth0 session, pull Imposium access creds on success and initialize app-wrapper
146
147
  */
147
148
  private doCheckSession = (blockRender : boolean = false) : void => {
148
- const {onAuthenticationFailure} = this.props;
149
+ const {onAuthenticationFailure, baseUrl} = this.props;
149
150
 
150
151
  if (blockRender) {
151
152
  this.setState({blockRender: true});
@@ -153,7 +154,7 @@ class AppWrapper extends React.Component<IAppWrapperProps, IAppWrapperState> {
153
154
 
154
155
  AuthService.checkSession()
155
156
  .then((freshIdentity : IIdentity) => {
156
- SessionService.getAccessData(freshIdentity.idToken)
157
+ SessionService.getAccessData(freshIdentity.idToken, baseUrl)
157
158
  .then((freshAccess : any) => {
158
159
  this.props.login(freshIdentity);
159
160
  this.props.cacheAccessData(freshAccess);
@@ -11,6 +11,7 @@ interface IAuthGateProps {
11
11
  auth0ClientId : string;
12
12
  auth0Hash : string;
13
13
  onAuthenticated : () => any;
14
+ baseUrl? : string;
14
15
  login : (id : IIdentity) => any;
15
16
  cacheAccessData : (accessData : any) => any;
16
17
  }
@@ -23,7 +24,7 @@ class AuthGate extends React.PureComponent<IAuthGateProps, {}> {
23
24
  }
24
25
 
25
26
  public componentDidMount = () : void => {
26
- const {auth0ClientId, auth0Hash, onAuthenticated} = this.props;
27
+ const {auth0ClientId, auth0Hash, onAuthenticated, baseUrl} = this.props;
27
28
 
28
29
  AuthService.bindToClient(auth0ClientId);
29
30
 
@@ -32,7 +33,7 @@ class AuthGate extends React.PureComponent<IAuthGateProps, {}> {
32
33
  } else {
33
34
  AuthService.parseIdFromHash(auth0Hash)
34
35
  .then((freshIdentity : IIdentity) => {
35
- SessionService.getAccessData(freshIdentity.idToken)
36
+ SessionService.getAccessData(freshIdentity.idToken, baseUrl)
36
37
  .then((freshAccess : any) => {
37
38
  this.props.login(freshIdentity);
38
39
  this.props.cacheAccessData(freshAccess);