Hi! I have a request. so we are using <updateJwt> ...
# ask-a-descoper
c
Hi! I have a request. so we are using updateJwt to decorate the jwt with a user prop, then updating the refresh token with
localstore.setItem('DSR', refreshToken)
in the UI. this works however it is a bit brittle if y'all ever change your cookie name. so my request is can you export this constant https://github.com/descope/descope-js/blob/09134f7bd9e4fa61862af1f041d0df0e1e7f1a6e/packages/web-js-sdk/src/enhancers/withPersistTokens/constants.ts#LL4C8-L4C8 or even better have a setRefreshToken method in your react-sdk
g
hey! 👋 thanks for the feedback, we will make sure to expose this in the frontend packages as well can you share which descope package are you using? in the meantime you can import this constant from
@descope/node-sdk
(
RefreshTokenCookieName
- see in link) though this is not an official commitment - noting that this DS/DSR naming is not likely to change in the near future 🙂
c
thank you! and yeah we are using
@descope/react-sdk
in the frontend and
@descope/node-sdk
in the backend. and ohhh interesting. I was nervous adding a node package in the browser but i'll check it out!
g
just a caveat - I never tried it 🙂 but it should work my recommendation to you is to use constant in the project we will expose it soon
c
lol! and cool will do. thanks again!
🙂 1