Getting useUser.user updated when app_metadata changes
See original GitHub issueDescribe the problem you’d like to have solved
Hi All, love the framework.
I need to get the client to check for changes in the idToken and accessToken once in a while.
using the kitchen-sink-example it takes a logout and a login in order to get any changes down to the client.
Im having a hard time understanding the whole space around “checksession” “refresh tokens”, some examples that is named my-handler that doesnt return anything. I think i read most of the documentation and i still cant get anything to work. Is this possible, and do you have any workable examples or hints on this?
Describe the ideal solution
I would like to get a new idToken at least on page refresh so like
useEffect( ()=> refresh() , [])
Alternatives and current work-arounds
I think this should be baked in, otherwise the whole app_metadata thing is pretty pointless. I just cant figure it out
Additional information, if any
Thank you
Issue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Ok for future reference i just made a function on api/refresh and did what this comment suggested.
Thank you @adamjmcgrath !
Thank you Adam, i will look into this