react-native - Auth0 Rule Not Working w/ API Call from React Native App
问题描述
I’ve been using Auth0
in my React
web app. I also have a rule that works with new user sign ups. In my web (React
) app, I use the Lock
library and everything works fine.
Now, I created a React Native
mobile app and because I have a custom login/sign up UI, I had to use the API method as opposed to using an Auth0
library such as Lock
, etc.
My SignUp API calls work fine and create new users but my rule is NOT working with API calls. I checked to see if rules apply only to my web app but I don’t see any setting for that so I assume all rules should work for all apps that appear on my dashboard – including my new React Native
mobile app.
The rule I created on Auth0
creates and assigns a new my_app_id
to the new user. This rule has worked flawlessly with all sign ups coming from my web app which uses the Lock
library but it doesn't seem to be firing when a new sign up comes in through the sign up API end point.
Is there anything I need to do so that my rule will work with my API calls?
解决方案
Rules only run after a successful authentication event. This would not include a successful signup endpoint call, where no credentials are authenticated.
The recommended way to hook to a signup would be through a registration hook.
推荐阅读
- java - 从 mongodb 获取随机值
- json - JSON:键和字段名称:动态解析
- python-3.x - 数据框 - 根据给定列的先前和当前行值创建新列
- ruby-on-rails - OOP 如何转化为 Rails?
- ssh - 通过 ssh 远程启动前台程序/脚本
- prolog - Prolog中的谓词,谓词仅适用于数字
- javascript - 如何使用 document.getElementById 将 CSS 切换为“display:none”
- javascript - jsPDF自动颜色在标题和行中的中心文本
- python - 我的函数没有返回变量,我不知道为什么
- visual-studio-code - 搜索框不断打开