How to implement a interceptor modal for user missing data
Unanswered
Asian black bear posted this in #help-forum
Asian black bearOP
I'm using Supabase auth along with Next 13 APP Router and I have all the functionality of auth implemented.
When a user sign up a profile is automatically created, now I want some code to check if the user has an
I'm not sure where to put this code, the sign up can be made from any page and he will be redirected to the exact same page, the modal should be visible along every page, if the user closes the application and open again the modal should be displayed until he picks an username.
I was thinking about putting it on the
When a user sign up a profile is automatically created, now I want some code to check if the user has an
username settled in his profile, if not, I need to show a modal so the user can choose his username. I'm not sure where to put this code, the sign up can be made from any page and he will be redirected to the exact same page, the modal should be visible along every page, if the user closes the application and open again the modal should be displayed until he picks an username.
I was thinking about putting it on the
/layout.tsx but since I'm using next-intl I cant await supabase.auth.getUser() so I can check if there is an username settled.