On-boarding step after social login
Hey! I m using google social signin and i give new users the 'pedning' role attribute in my database,
I want to redirect these type of users to the onboarding page whenever they try to access anything in my app. where i collect additional infos about them such as to setup a displayname. , so basically not allowed to skip this step, then i change their status to something like 'member'.
i want to know if there is a way to get the authenticated user data in my middleware so i can read their role status and redirect accordinly isntead of spamming all my pages with this check ? or any other method.
thank you !
I want to redirect these type of users to the onboarding page whenever they try to access anything in my app. where i collect additional infos about them such as to setup a displayname. , so basically not allowed to skip this step, then i change their status to something like 'member'.
i want to know if there is a way to get the authenticated user data in my middleware so i can read their role status and redirect accordinly isntead of spamming all my pages with this check ? or any other method.
thank you !