如何在注册过程中使用IdentityCore添加默认角色user: My AuthController并使用类UserMenager和SignInManager,IConfiguration,我想在用户注册过程中添加角色我有3个模型负责用户和角色。一个用户可以有多个角色,但这里他假设用户有一个角色,例如一个学生,一个角色可以有多个用户。[AllowAnonymous]
[Route("api</em
我已经使用保护创建了代码和经过身份验证的用户,但是它没有提供给我一个api_token * This'll provide login authentication to the user'), 'data' => auth()->user()],200);上面的函数工作正常,但我使用auth()->guard('api')->user()->api_to