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

chore: Modify header based auth logic based on reviews #79

Merged
merged 7 commits into from
Jan 9, 2023

Conversation

nkshah2
Copy link
Contributor

@nkshah2 nkshah2 commented Jan 9, 2023

Summary of change

  • Removes the use of cookie strings when storing tokens
  • Adds a getAccessToken function
  • Adds tests to make sure sessions from older versions are handled correctly when migrating

Related issues

Test Plan

All tests pass, added additional tests

Documentation changes

Checklist for important updates

  • Changelog has been updated
  • frontendDriverInterfaceSupported.json file has been updated (if needed)
    • Along with the associated array in lib/ts/version.ts
  • Changes to the version if needed
    • In package.json
    • In package-lock.json
    • In lib/ts/version.ts
  • Had run npm run build-pretty
  • Had installed and ran the pre-commit hook
  • Issue this PR against the latest non released version branch.
    • To know which one it is, run find the latest released tag (git tag) in the format vX.Y.Z, and then find the latest branch (git branch --all) whose X.Y is greater than the latest released tag.
    • If no such branch exists, then create one from the latest released branch.

Remaining TODOs for this PR

  • ...

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

size-limit report 📦

Path Size
lib/build/index.js 24.14 KB (-0.99% 🔽)

@nkshah2 nkshah2 marked this pull request as draft January 9, 2023 13:12
@nkshah2 nkshah2 marked this pull request as ready for review January 9, 2023 13:38
@rishabhpoddar rishabhpoddar merged commit 0cbbcea into header-based-auth-feature Jan 9, 2023
@rishabhpoddar rishabhpoddar deleted the header-based-auth-changes branch January 9, 2023 13:42
rishabhpoddar pushed a commit that referenced this pull request Feb 1, 2023
* feat: Add logic to allow using headers instead of cookies (#74)

* Make changes for fetch

* Make changes for axios

* Changes to test

* Changes to test

* Changes to test

* Fix config tests

* Fix config tests

* Refactor

* Fix fetch tests

* Fix general error tests

* Update axios tests

* Update axios tests

* Fic for axios

* Fic for axios

* Fixes

* Fix header logic

* Add axios 2 header tests

* Fix issue with axios

* Fix issue with axios

* Fix issue with axios

* Fix issue with axios

* Add header tests for fetch

* Add header checks for config tests

* Make header the default mechanism

* Update tests

* Update based on PR review

* Update tests

* Add function to get access token

* Add tests to make sure older sessions still work

* Refactor

* Refactor

* Refactor

* Refactor

* Add axios tests

* chore: Modify header based auth logic based on reviews (#79)

* Add function to get access token

* Add tests to make sure older sessions still work

* Refactor

* Refactor

* Refactor

* Refactor

* Add axios tests

* Add additional tests for fetch

* Add additional tests for axios

* Add tests

* Export getAccessToken as a default export

* Handle cookie strings for legacy sessions when reading tokens from storage

* Add test for moving from old cookies to header

* Update FDI, CHANGELOG and package versio

* Refactor
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.

None yet

2 participants