Skip to content

How to run CRA with authorization in Safari on localhost? #12763

Discussion options

You must be logged in to vote

Finally I found the reason of this problem. My auth service sends the 'Set Cookie' response header with the 'secure' flag. But locally I run my app using 'http'. That is why Safari doesn't accept the cookie. To fix this issue I run my app using 'https'.

I've added additional script to the 'package.json' file:

"start-https": "HTTPS=true react-scripts start",

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Erixxxxxxxx
Comment options

Answer selected by SergeyAlexeev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants