-
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
Add API Key Generation Page #2218
Conversation
… JSON but we'll see how that goes
<h2>Resources</h2> | ||
<ul> | ||
<li> | ||
The MC-Review{' '} |
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.
use
not jsx with empty strings to ensure accurate spaces visually - this is in a few places
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.
huh those were all added by the linter
services/app-web/src/index.tsx
Outdated
@@ -136,6 +141,7 @@ if (ldClientId === undefined) { | |||
authMode={authMode} | |||
apolloClient={apolloClient} | |||
s3Client={s3Client} | |||
apiURL={apiURL} |
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.
Why string this variable through as a prop everywhere ? I think its not needed, it is not used across the application logic ( whereasauthMode
is )
I suggest we just access this process.env directly in the AppAccess.tsx
component and remove the code changes in App/AppBody/AppRoutes entirely.
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.
Alright, I can do that. Agreed this is annoying to prop drill so deep. Maybe we could have some kind of config context to read from? Anytime we read env vars out side of index.tsx (or apollo_gql.ts on the back end) it smells a little, making it a little harder to test things cleanly
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.
<ul> | ||
<li> | ||
<code> | ||
Authorization: Bearer eyJhbGciOiJIU... |
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 could be helpful to include a complete sample cURL request here
@@ -0,0 +1,75 @@ | |||
describe('thirdPartyAPIAccess', () => { |
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.
It's great to have cypress test for this!
Summary
This PR adds a route "dev/api-access" that allows any user to generate an API key that will allow access to the app for 90 days.
Also adds a Cypress test for api key access
Related issues
https://jiraent.cms.gov/browse/MCR-3833
Screenshots
Test cases covered
Wrote a new cypress test that generates an API key and calls an API