-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
|
||
export type ContextState = { | ||
isLoggedIn: boolean; | ||
user: object; |
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.
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
};
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.
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.
Uses the authorization code from NIH to log in to AuthN. Jira ticket CRDCDH-39