You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting a 400 when calling directus.auth.refresh(). I have the auth protocol set to json as I'm using the community cloud edition and google chrome so cannot disable secure cookies (that I know of at least).
Here you can see I do have a token that can be read via `directus.auth.token`, but refreshing fails.
Here's the code block I'm using just for completeness sake. I did see a few discussions with similar issues, but didn't find any solutions on those.
consttoken=awaitdirectus.auth.token;if(!token){setUser(undefined);return;}console.log(`Refreshing token: ${token}`);constrefreshResult=awaitdirectus.auth.refresh();if(!refreshResult){setUser(undefined);}else{// The types are 99% the same, some casting seems to work fineconstapiUser=awaitdirectus.users.me.read()asUserType;console.log(apiUser);setUser(apiUser);}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Getting a 400 when calling
directus.auth.refresh()
. I have the auth protocol set tojson
as I'm using the community cloud edition and google chrome so cannot disable secure cookies (that I know of at least).Here you can see I do have a token that can be read via `directus.auth.token`, but refreshing fails.
Here's the code block I'm using just for completeness sake. I did see a few discussions with similar issues, but didn't find any solutions on those.
Beta Was this translation helpful? Give feedback.
All reactions