kuzyaross
12/20/2022, 5:55 AMauth/signinup/code
, then sends otp (we use passwordless recipe) auth/signinup/code/consume
which gives them tokens. This works fine, but now we want users of mobile app, which we are developing have tokens which will expire after a day, not after several hours as now.
TIA.nkshah2
12/20/2022, 5:59 AMkuzyaross
12/20/2022, 6:21 AMauth/mobile/signup/code
that does the same thing as the default auth/signup/code
, only I can limit the roles that can use this path?auth/mobile/signup/code
(for mobile app) and auth/signup/code
(for other)nkshah2
12/20/2022, 6:23 AMauth/signup/code
API to consume that information and do some custom logickuzyaross
12/20/2022, 6:28 AMnkshah2
12/20/2022, 6:29 AMkuzyaross
12/20/2022, 6:29 AMnkshah2
12/20/2022, 6:34 AM/signinup/code/consume
API (Refer to this for overrides https://supertokens.com/docs/passwordless/advanced-customizations/apis-override/usage). This API is responsible for signing up users after they enter the code
In this API check if the request contains the custom header/body property that your mobile users would send. If it contains it, you can set different roles than the ones you normally would for this userapi_options
variable which the api receives as an input. This will allow you to read the original request and any custom properties you may have setkuzyaross
12/20/2022, 6:38 AMnkshah2
12/20/2022, 6:38 AM