Create Users Manually (Email still required) (#1381)

* Implemented a manual button to allow users to setup an account, even after they invited.

Updated error toast to put "Error" in the title of the toast.

* Updated the exception middleware to always send full context instead of generic "Internal Server Error"
This commit is contained in:
Joseph Milazzo 2022-07-17 11:43:03 -04:00 committed by GitHub
parent 63d74ecf9a
commit 1d806bf622
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 1668 additions and 17 deletions

View file

@ -147,6 +147,15 @@ export class AccountService implements OnDestroy {
return this.httpClient.post<User>(this.baseUrl + 'account/confirm-email', model);
}
/**
* Given a user id, returns a full url for setting up the user account
* @param userId
* @returns
*/
getInviteUrl(userId: number, withBaseUrl: boolean = true) {
return this.httpClient.get<string>(this.baseUrl + 'account/invite-url?userId=' + userId + '&withBaseUrl=' + withBaseUrl, {responseType: 'text' as 'json'});
}
getDecodedToken(token: string) {
return JSON.parse(atob(token.split('.')[1]));
}