Skip to content

Commit

Permalink
Merge pull request #963 from valtimo-platform/fix/form-io-token-10-8-…
Browse files Browse the repository at this point in the history
…3-node16

- Set Formio's `projectUrl` and `authUrl to the current origin, so th…
  • Loading branch information
ThomasMinkeRitense authored Apr 26, 2024
2 parents 54fd38f + 3612b36 commit d65e05f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ export class FormioComponent implements OnInit, OnChanges, OnDestroy {
) {}

public ngOnInit() {
Formio.setProjectUrl(location.origin);
Formio.authUrl = location.origin;

this.openRouteSubscription();
this.errors$.next([]);
this.setInitialToken();
Expand Down Expand Up @@ -190,6 +193,7 @@ export class FormioComponent implements OnInit, OnChanges, OnDestroy {
}

private setToken(token: string): void {
Formio.setUser(jwt_decode(token));
Formio.setToken(token);
localStorage.setItem('formioToken', token);
this.setTimerForTokenRefresh(token);
Expand Down

0 comments on commit d65e05f

Please sign in to comment.