Тёмный

Assigning Default Roles to a User on Sign up Using Auth0 Actions 

OktaDev
Подписаться 60 тыс.
Просмотров 9 тыс.
50% 1

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@CodeNClouds
@CodeNClouds 11 месяцев назад
Thanks for sharing how to assign a default role with actions for a machine-to-machine application, can you please share the same for a Single Page Application client? Thanks.
@cahumada85
@cahumada85 11 месяцев назад
Excelent Thanks!
@MatthiasHarter
@MatthiasHarter 10 месяцев назад
Note that the role assigned in the custom action applies to the issued token. This is a very important detail. Otherwise you would need to logout and login again. To have the new permissions of that role in the permissions claim.
@Caleb-v7z8l
@Caleb-v7z8l 27 дней назад
In your docs it is recommended not to call the management api from within actions, is there an updated guide for default user roles?
@alexfrancis6091
@alexfrancis6091 8 месяцев назад
Hey, how can I send the role of a user from the frontend? I don't want to assign a default user role, rather I want to set it based on if the user decides to sign up as role A or role B
@carlaustabile
@carlaustabile 8 месяцев назад
Hey! Without having all context about your app architecture, one approach could be getting the role in the frontend and then pass it to your backend or API, then your backend can make a call to the Auth0 Management API and assign the role through there. Hope this helps !
@fawzytat8498
@fawzytat8498 11 месяцев назад
Can you explain how to do the same for login from a react native app? which client ID, secret and domain I should use in this case?
@carlastabile-okta
@carlastabile-okta 11 месяцев назад
Hello! thanks for your comment! Without having much info on your use case I'd that if you need to interact with the Management API (which is the case to assign roles) you need to have an M2M application on Auth0 that connects to your server and those would be the credentials (domain, clientID and clientSecret) that you'd need to use. Hopefully this helps!
@fawzytat8498
@fawzytat8498 11 месяцев назад
Thank you! That worked. btw the code in the video is correct, the one at the blog isn't. the one at the blog should be if ( event.authorization && event.authorization.roles && event.authorization.roles.length > 0 ) { return; }
@OktaDev
@OktaDev 11 месяцев назад
Thank you! the blog is up to date now.
@kynjal23
@kynjal23 6 месяцев назад
how do i assign a username automatically on sign up
@SahilBhosale08
@SahilBhosale08 6 месяцев назад
By passing username in the request body, in the SignUp API
@AlexCage19
@AlexCage19 7 месяцев назад
Considering that hardcoding role ID in action is not what people usually do it would require to pull and filter role by name as well. Also creating separate application for Auth0 actions. Taking into account that everything should be put into some king of scripts to be run by CLI as doing everything by hand from UI is just for demo purposes it seems like too much effort for something that should have come out out of the box
@PriyankaSharma-cc5ou
@PriyankaSharma-cc5ou 6 месяцев назад
Hi, I need help! How can I integrate Auth0 authentication into the login process and add new fields like "firstname" and "lastname"? I also want to retrieve these names and pass them to the backend using a webhook. Can anyone help me out?
@OktaDev
@OktaDev 4 месяца назад
Hi! To integrate Auth0 you can use one of our SDKs depending on the language/framework and application type you have, here's a link to all the SDKs we support: auth0.com/docs/libraries Then, to add new fields in the sign-up process you can use Custom Prompts and customize the sign-up or login pages to fit your needs: auth0.com/docs/customize/login-pages/universal-login/customize-signup-and-login-prompts Hope this helps! -Carla
@Lluminor
@Lluminor 8 месяцев назад
Light theme 😢
@carlaustabile
@carlaustabile 6 месяцев назад
I know 😅 I code with dark theme but I need my browser brightttttt
@flavb83music
@flavb83music 9 месяцев назад
lmao 25 minutes to get roles from a user wth this is not satisfying Otkta! (the video is good btw)
@carlaustabile
@carlaustabile 8 месяцев назад
Glad you like it. It actually takes way less time but you have to put up with my brain dumping and singing skills 😂 wondering if you’d prefer this in like a RU-vid short format? 🤔
@anurajnarayanan4124
@anurajnarayanan4124 Месяц назад
I am getting Unauthorized when I run the test in the Actions after replacing the user id. Did I miss anything @carlaustabile @OktaDev ?
Далее
How to Protect an API in FastAPI with Auth0 by Okta
25:42
How to Hack OAuth
25:10
Просмотров 43 тыс.
Как не носить с собой вещи
00:31
Просмотров 937 тыс.
Тестирую гаджет для роллов! 🙈
00:42
Migrating Auth0 Rules to Auth0 Actions
25:37
Просмотров 3,8 тыс.
React.js User Login and Registration with Auth0
25:28
Session Vs JWT: The Differences You May Not Know!
7:00