-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
chore(auth): add oauth metadata into token orchestrator #13712
chore(auth): add oauth metadata into token orchestrator #13712
Conversation
packages/auth/src/providers/cognito/utils/oauth/completeOAuthFlow.ts
Outdated
Show resolved
Hide resolved
expect(mockOAuthSignOutRedirect).toHaveBeenCalledWith(cognitoConfig); | ||
}); | ||
|
||
it('should complete OAuth sign out and redirect when there oauth metadata in tokenOrchestrator', async () => { |
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.
Sanity check: Are there more tests we can add? E.g. signing out of an existing session without this meta-data in storage, error cases, etc.
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.
The previous tests are already signing out without depending on this metadata in storage already. Further test cases will be introduced by the e2e test
…13712) * chore: add oauth metadata into token orchestrator * chore: add unit tests * chore: address feedback
…13712) * chore: add oauth metadata into token orchestrator * chore: add unit tests * chore: address feedback
* wip: hardcode signout uri for poc * chore: expose the prefferedRedirectSignOutUrl * chore: add prefered url change to native file * chore: correct param name * chore: update getRedirectUrl function to consider preferred url * chore: add unit test for the feature * chore: update input type to use the accepted format * chore: review comments * fix: address npm audit issues * chore: update comments, bundle size and rn version * chore: update bundle size limit * chore: update bundle size limit * chore: address coments and rename a param to getRedirecturl funciton * chore: make preid release ready * chore: update yarn.lock * chore: add test and update push-integ branch * chore: revert preid release updates * chore: update sample name * chore: update yarn.lock * chore(auth): add oauth metadata into token orchestrator (#13712) * chore: add oauth metadata into token orchestrator * chore: add unit tests * chore: address feedback * chore: fix unit tests * chore: enable tests in ci --------- Co-authored-by: ManojNB <manojnb95@gmail.com>
…13712) * chore: add oauth metadata into token orchestrator * chore: add unit tests * chore: address feedback
…13712) * chore: add oauth metadata into token orchestrator * chore: add unit tests * chore: address feedback
* chore: enable subdomains e2e test * chore(auth): add oauth metadata into token orchestrator (#13712) * chore: add oauth metadata into token orchestrator * chore: add unit tests * chore: address feedback
* chore(auth): add oauth metadata into token orchestrator (#13712) (#13736) * chore: add oauth metadata into token orchestrator * chore: add unit tests * chore: address feedback * wip: hardcode signout uri for poc * chore: expose the prefferedRedirectSignOutUrl * chore: add prefered url change to native file * chore: correct param name * chore: update getRedirectUrl function to consider preferred url * chore: add unit test for the feature * chore: update input type to use the accepted format * chore: review comments * fix: address npm audit issues * chore: update comments, bundle size and rn version * chore: update bundle size limit * chore: update bundle size limit * chore: address coments and rename a param to getRedirecturl funciton * chore: make preid release ready * chore: update yarn.lock * chore: add test and update push-integ branch * chore: revert preid release updates * chore: update sample name * chore: enable react native tests with localhost server * chore: enable subdomain test * chore: update some function calls in tests * chore: minor reverts * fix: unit tests fail on mehtod params * chore: revert ppush branch * chore: remove subdomain test rdundant * chore: upadte step name * chore: reflect API changes and clean up * chore: revert unintented change glob * chore: bundle size minor adjustments * chore: move localhost page hosting to RN script in the app * chore: revert unintended change * chore: revert branch name for integ test --------- Co-authored-by: israx <70438514+israx@users.noreply.github.com> Co-authored-by: AllanZhengYP <zheallan@amazon.com>
Description of changes
This change adds oauth metadata into the token orchestrator. This metadata is set after the user has authenticated via OAuth, and it can be accessed from the current
KeyValueStorage
(LocalStorage, SessionStorage, CookieStorage, etc).Issue #, if available
Description of how you validated changes
Checklist
yarn test
passesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.