Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Jc/0 0 15 updates #43

wants to merge 2 commits into from

Conversation

jchu231
Copy link
Contributor

@jchu231 jchu231 commented Dec 19, 2024

No description provided.


string createdOrgToken =
createOrgTokenResponse.CreatedOrgToken != null && createOrgTokenResponse.CreatedOrgToken.PlainTextToken.Length > 0 ?
createOrgTokenResponse.CreatedOrgToken.PlainTextToken : "";
Copy link

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);
Copy link

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

Copy link

@natgabb natgabb left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants