garrett7056
12/08/2022, 4:17 PMuseSessionContext hook from the auth-react/recipe to not change/cause a rerender when the accessToken expires?rp_st
12/08/2022, 4:18 PMgarrett7056
12/08/2022, 4:18 PMrp_st
12/08/2022, 4:18 PMgarrett7056
12/08/2022, 4:19 PMgarrett7056
12/08/2022, 4:21 PMjwt from the accessTokenPayload as the Authorization Bearer token to make requests to our own backend.garrett7056
12/08/2022, 4:23 PMgarrett7056
12/08/2022, 4:25 PMrp_st
12/08/2022, 4:25 PMrp_st
12/08/2022, 4:25 PMrp_st
12/08/2022, 4:26 PMrp_st
12/08/2022, 4:26 PMuseSessionContext, then it won't cause an auto refreshrp_st
12/08/2022, 4:26 PMgarrett7056
12/08/2022, 4:27 PMrp_st
12/08/2022, 4:27 PMgarrett7056
12/08/2022, 4:30 PMgarrett7056
12/08/2022, 4:35 PMporcellus
12/08/2022, 4:37 PMuseSessionContext isn't supposed to be doing updates like that. If you have to have a fresh value (like in your case) you should use getAccessTokenPayloadSecurely directly before the call.porcellus
12/08/2022, 4:38 PMSessionAuth and SupertokensAuthWrapper componentsporcellus
12/08/2022, 4:38 PMporcellus
12/08/2022, 4:39 PMporcellus
12/08/2022, 4:40 PMporcellus
12/08/2022, 4:40 PMgarrett7056
12/08/2022, 4:43 PMhasura so I don't think we're protecting the underlying express routes in the way you would expect. I do think that's probably why we're not getting some of the baked in features you're referring to though.porcellus
12/08/2022, 4:46 PMapiDomain passed to the init function in appInfo. If a request to apiDomain is rejected with a 401 it should trigger a refresh.rp_st
12/08/2022, 4:49 PMgarrett7056
12/08/2022, 5:41 PMrp_st
12/08/2022, 5:50 PMrp_st
12/08/2022, 5:51 PMrp_st
12/08/2022, 5:57 PMgarrett7056
12/08/2022, 5:59 PMrp_st
12/08/2022, 5:59 PMrp_st
12/08/2022, 6:00 PMgarrett7056
12/08/2022, 7:57 PMrp_st
12/09/2022, 3:40 AMrp_st
12/09/2022, 3:41 AMrp_st
12/09/2022, 3:43 AM