Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CRDCDH-39 #43

Merged
merged 15 commits into from
Jul 14, 2023
Merged

CRDCDH-39 #43

merged 15 commits into from
Jul 14, 2023

Conversation

JoonLeeNIH
Copy link
Contributor

Uses the authorization code from NIH to log in to AuthN. Jira ticket CRDCDH-39


export type ContextState = {
isLoggedIn: boolean;
user: object;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible we could create a type for the user object? This will make it easier to predict the data structure provided by the AuthContext for components using it.

e.g.

export type User = {
  firstName: string;
  role: "User" | "FederalLead"; // any other roles supported
  // ... other fields provided by the API
};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, Alec. I know I'll miss more stuff like this as I get used to TypeScript, so please feel welcome to point things out as you see them.

@jonkiky jonkiky merged commit c08ba75 into mvp-1.0.0 Jul 14, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants