-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jc/0 0 15 updates #43
base: main
Are you sure you want to change the base?
Conversation
|
||
string createdOrgToken = | ||
createOrgTokenResponse.CreatedOrgToken != null && createOrgTokenResponse.CreatedOrgToken.PlainTextToken.Length > 0 ? | ||
createOrgTokenResponse.CreatedOrgToken.PlainTextToken : ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you do something more than just assign it ""
if it is null or empty?
createNewAuthCancelToken(); | ||
Auth0Login auth = new(); | ||
string refreshToken = await auth.GetTokenAsync(cancelToken: AuthCancelTokenSrc.Token); | ||
|
||
HathoraServerOrgApiWrapper orgApiWrapper = new(); | ||
string createdOrgToken = await orgApiWrapper.CreateOrgTokenAsync(refreshToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as discussed - you should use the bearer token instead of the refresh token
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be as easy as changing this line:
refreshToken = tokenResponse.RefreshToken; |
refreshToken = tokenResponse.RefreshToken;
=>
bearerToken = tokenResponse.AccessToken;
and maybe some cleanup to remove mentions of refresh token in the code
No description provided.