https://supertokens.com/ logo
Title
h

Hrithik.s.raj

02/07/2023, 6:48 AM
can i get any example for implementing rolebased access control in nestjs
r

rp

02/07/2023, 6:50 AM
hey @Hrithik.s.raj
we don't have that specific example. But we have an example with nestjs (use our create-supertokens-app CLI) and you can see our docs for rbac
h

Hrithik.s.raj

02/07/2023, 6:59 AM
ya i have a doubt on this can i change the role from the dashboard or something becuase as i can see the documentation we need to override the signup process and assign the user with the role .will that be an efficient approach?
r

rp

02/07/2023, 7:00 AM
that will work well. Yes
h

Hrithik.s.raj

02/07/2023, 7:00 AM
But how can i assign the roles dynamically
because i cant cange the code each time the user signs up
it can be changed later
r

rp

02/07/2023, 7:01 AM
have you seen our docs for rbac?
h

Hrithik.s.raj

02/07/2023, 7:01 AM
yes
r

rp

02/07/2023, 7:01 AM
ok. I can only help you if you have specific questions and a specific use case
"how can i assign the roles dynamically" -> this is a very vague question and problem
h

Hrithik.s.raj

02/07/2023, 7:02 AM
let me elaborate
i need to implement rbac .. is there any way that i can change or set the roles for an user in a dashboard or so?
r

rp

02/07/2023, 7:04 AM
Not via our dashboard (yet). But we have functions in the backend SDK using which you can update the roles of a user, or create new roles
h

Hrithik.s.raj

02/07/2023, 7:05 AM
as i can see the docs while signing up of the user i need to override it and add the user role for that user during the time of signup. but it changes from user to user ryt. let say person a and b signups but only b should have the admin rights
can i be able to achieve this?
r

rp

02/07/2023, 7:05 AM
yes
in the override, you determine which type of user it is and add the appropriate role.
h

Hrithik.s.raj

02/07/2023, 7:06 AM
if case if i want to change the user role later i need to change the role for an already signed up user?
r

rp

02/07/2023, 7:07 AM
yes you can do that too
h

Hrithik.s.raj

02/07/2023, 7:07 AM
is the dashboard in the roadmap? because this is the requirement for an big project .
again i need to touch the code right?
r

rp

02/07/2023, 7:07 AM
yes, changing roles via the dashboard is in our roadmap
> again i need to touch the code right? You can call the core API via postman directly.
So no need to touch the code
h

Hrithik.s.raj

02/07/2023, 7:08 AM
can you please share me the api docs reference ?
How long will it take for the dashboard to be built?
r

rp

02/07/2023, 7:09 AM
See our docs here: https://supertokens.com/docs/userroles/creating-role If you see the code snippets, they have a
curl
command section in the tabs.
> How long will it take for the dashboard to be built? 2-4 months time perhaps.
h

Hrithik.s.raj

02/07/2023, 7:10 AM
okay .. Thank you
r

rp

02/07/2023, 7:10 AM
happy to help 🙂
h

Hrithik.s.raj

02/07/2023, 7:54 AM
Hi @rp
I have an use case can u guide me out whether it can be achieved with supertokens
r

rp

02/07/2023, 7:55 AM
sure
h

Hrithik.s.raj

02/07/2023, 7:56 AM
lets say i have an application with multiple projects in that and for each project the same user will be having different roles can i handle this with the rbac features which supertokens have right now?
r

rp

02/07/2023, 7:58 AM
yes it's possible. You can override the user roles recipe functions to return only a sub set of the roles associated with the user based on the app. So from supertokens' core point of view, the user would have all the roles (across all projects), but you filter that down in the backend SDK override based on the app being used.
h

Hrithik.s.raj

02/07/2023, 7:59 AM
how can i dynamically change that base don the project?
r

rp

02/07/2023, 7:59 AM
you need to use override feature on the backend
h

Hrithik.s.raj

02/07/2023, 7:59 AM
yeaah
okay
r

rp

02/07/2023, 8:00 AM
if you want step by step guide,. you can subsrcibe to our support plan, and we can help you out as you need. This forum is mainly intended to answer short, specific questions about how to use supertokens.
h

Hrithik.s.raj

02/07/2023, 8:01 AM
we are planning to buy the paid verison for this
but i need to give the clear outline for this which all these can be done effieciently
for auth its done and accepted but only issue is with the rbac
r

rp

02/07/2023, 8:02 AM
well, it is possible to do what you want. Overrides are quite flexible.
If you want, we can discuss this and pricing over a call.
h

Hrithik.s.raj

02/07/2023, 8:48 AM
can i add microsoft outlook login provider?
r

rp

02/07/2023, 9:26 AM
yes
see our custom provider section
h

Hrithik.s.raj

02/07/2023, 11:14 AM
Hi @rp
while doing google provider auth what are the scopes thats getting requested? and what if i need metadata like photourl and email in the token ?
r

rp

02/07/2023, 11:37 AM
you can change the scope - search in our docs for how to change the scope
h

Hrithik.s.raj

02/07/2023, 11:41 AM
the photourl and other metadata from th euser?
thats usually coming from the auth provider
r

rp

02/07/2023, 11:42 AM
i mean, set the right scope, and then call google with the access token that we return.
changing scope and using the provider's access token are all in our docs
h

Hrithik.s.raj

02/07/2023, 12:11 PM
okay thank you