209 похожих чатов

Привет, хорошая ли идея делать JWT авторизацию с сохранением в

куки?

13 ответов

7 просмотров

сейчас начнётся ))

два токена, один рефреш токен - хранишь в httpOnly куке и короткоживущий который держишь в памяти и кидаешь самостоятельно призапросах. и всё будет в ажуре у тебя

Вот мнение https://gist.github.com/zmts/802dc9c3510d79fd40f9dc38a12bccfc

Maksim Drazdou- Автор вопроса
Кирилл Сабитов
сейчас начнётся ))

я имею ввиду не на фронте) а отдавать из nest response.cookie('jwt', jwt)

Avin
два токена, один рефреш токен - хранишь в httpOnly...

я писал на днях реализацию. Убедитесь, что вы не можете получить длинный токен по короткому.

Maksim Drazdou
я имею ввиду не на фронте) а отдавать из nest resp...

если у тебя будет один токен и он будет в куке, тогда нужно дополнительно докручивать защиту от csrf

Maksim Drazdou- Автор вопроса
Avin
если у тебя будет один токен и он будет в куке, то...

а вообще это норм практика или лучше отдавать jwt и проверять через Bearer?

Maksim Drazdou- Автор вопроса
Кирилл Сабитов
чиво? ))) почитай gist.

а что не так? как в Laravel там отдаешь на фронт access_token, token_type и expires_in и потом в Authorization: Bearer ...

Maksim Drazdou
а что не так? как в Laravel там отдаешь на фронт a...

а. ты хочешь НЕ использовать JWT ? Ну так а как ты валидируешь, что пользователь не подкрутил expires_in ?

Maksim Drazdou- Автор вопроса

Похожие вопросы

Обсуждают сегодня

A couple thoughts from a random internet stranger: 1. If you want this project to gain traction you cannot keep being negative. If I just came here after finding out about Kd...
Eric Wild
45
How Will #Monero Be Attacked? First of all I want to tell you that this is not teaching the network attackers, the central regulators. They already know how to attack the net...
Li₿ΞʁLiøη
3
we need to look at what power and capital monopolies are seeking to prevent or control in order to understand why it is important to keep building right now. the elites are go...
Noah
1
Bhai mera Wazirx Account locked kr diya hei inhone to use unlock kese kru ?? Kisi ke ye problem aayi aur solve ho gayi hei to batao ?
Govind Jarwal
33
There are too many wallet applications in the Egfo ecosystem. It is really hard to keep track of these wallets. Which wallet should we send ergo or other coins to? Why shoul...
Şerafettin Bayrakdar
4
What do you thing about new fees in litewallet, guys? $0.20 min and $3 max?
GGayAllin R
12
Been reading about the IPFS links for RH tokens/projects. I still use the links rather than run the software, but sounds like it’s time to download & run the software. What’s ...
H N
7
Mike, thanks for the answers. Not that I want to stress, but would u agree that in the meantime Kadena needs to get some attention. Market cap is melting together with trust. ...
Rasmus
4
Some news on bonding guys?
A D
8
Hello guys I was wondering whether if it is OK to download the monero block chain without using tor?? Does that effect the privacy of the wallet I want to connect the monero b...
Jackisow
13
Карта сайта