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

Can you specify cookies for cookie storage? #1735

Closed
jrp-23 opened this issue Sep 24, 2018 · 6 comments
Closed

Can you specify cookies for cookie storage? #1735

jrp-23 opened this issue Sep 24, 2018 · 6 comments
Labels
feature-request Request a new feature Storage Related to Storage components/category

Comments

@jrp-23
Copy link

jrp-23 commented Sep 24, 2018

I’m considering using cookie storage for the purpose of sending a JWT to the server on every HTTP request.

I configured my app to use cookie storage but doing so will include all 3 JWTs (id, access, and refresh) as separate cookies. All 3 cookies will be sent for each request, but I only need 1 (access token). I don’t want the other 2 cookies sent as it is unnecessary additional payload which has the potential to decrease performance.

My question is: can I specify that just the access token is stored in a cookie?

@jordanranz jordanranz added the Auth Related to Auth components/category label Sep 24, 2018
@powerful23
Copy link
Contributor

@jrp-23 sorry but for now there is no way to do that. Will mark as feature request.

@powerful23 powerful23 added the feature-request Request a new feature label Sep 24, 2018
@stale
Copy link

stale bot commented Jun 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@scorgn
Copy link

scorgn commented Jul 29, 2019

We are having issues with our websites as the header size is too large with all of the cookies that are set. We also only need the access token. This feature would be nice. As of right now we're looking at having Amplify use local storage and additionally setting an access token cookie, but that's messy.

@sammartinez sammartinez added Storage Related to Storage components/category and removed Auth Related to Auth components/category labels Oct 9, 2019
@pwfcurry
Copy link

You can use a custom storage & filter out cookie keys you don't want to use.

https://aws-amplify.github.io/docs/js/authentication#managing-security-tokens

Related: #1545

@ericclemmons
Copy link
Contributor

Closing as https://docs.amplify.aws/lib/auth/manageusers/q/platform/js#managing-security-tokens is the best way to customize credential storage.

It's worth noting that 431 errors can occur for tokens with a large number of claims!

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request a new feature Storage Related to Storage components/category
Projects
None yet
Development

No branches or pull requests

7 participants