We have implemnted a new oauth login flow. We need to know if a users account has ALREADY been created, or if were logging in again after the account has been created.
We assume this must be possible with all of the tooling that is available.
Any hints on how we can detect this?
Thanks.
5 Answer(s)
-
0
Hi @commondesk
Currently there is no endpoint to do this by default. If you only need this in your method and want to use it internally, you can use UserManager to find the user with the username. If you need an endpoint, you can create a method on UserAppService and agian use the UserManager to detect users existance.
-
0
We need a webservice that can be checked from javascript for this purpose.
Are there any tutorials on how to add new swagger bases webservice for this purpose?
Is this the correct place to add it?
-
0
I cant find any documenation on how to extend swagger to provide a new method. WTF??
-
0
Hi, assuming that by "extend swagger", you mean adding new endpoint.
If so, you can refer to @ismcagdas 's suggestion
If you need an endpoint, you can create a method on UserAppService and agian use the UserManager to detect users existance.
for documentation on application service, you can refer to https://aspnetboilerplate.com/Pages/Documents/Application-Services
-
0
Thanks for the clarification and the link.
When i say "extend swagger" i should have said, "add a new REST webservice that can be called from javascript".
So, it sounds that if I add a method to UserAppService.cs and the IUserAppService, it will automaticlly expose this as a REST Webservice?
As far as the "Documentation" .
Application Services are used to expose domain logic to the presentation layer.
Translates to -- Add a new webservice -- Got it.