2

I have two SPA projects for the same users and I have an identity server for 3rd party authentication, can I use the API from Ids to get tokens or register new users without redirecting to Ids page?

  • I think you'd better not set the flow like this. Normally, we add identity module which will redirect to the login page provided by that module, that means all the sign in actions are in their page and it's save. But you said is like to obtain token via api, so how to ensure the safety about the request is the problem. – Tiny Wang Sep 10 '21 at 06:23
  • I will call API to get token from the SPA project Backend to ensure API of Ids is safety – Hussein A Sahei Sep 10 '21 at 16:42
  • Hmmm, then I think you need to check the official document of the 3rd authentication if it has option to realize your feature, if there's no such solution, then I think it no luck. – Tiny Wang Sep 13 '21 at 01:32
  • Hi, I've seen your comment and I think you should put your solution as the answer to end this case rather than update your question for your further issue. It's better to end this case and create a new one so that more community members could see it. – Tiny Wang Sep 17 '21 at 01:47
  • Hi, TinyWang I solved this by generating IDs for 3rd party authentication only. and creating an API project for user management and registration, all requests should be approved by getting token from IDs. ***this question was helped me*** [link](https://stackoverflow.com/questions/42450840/user-registration-process-with-identityserver4) – Hussein A Sahei Sep 17 '21 at 01:55
  • hmm, my first comment is not complete so I deleted it. @TinyWang – Hussein A Sahei Sep 17 '21 at 02:01
  • I doubt you wanna send me 15 reputations here hh. You should post your solution in the textarea below and post it as the answer rather than a comment. You post an answer will help other people met similar issue to find your solution easier, and certainly, you can pick it as the answer too : ) If I copy your answer and post, then you accept it as the answer, I'll get 15 reputations. – Tiny Wang Sep 17 '21 at 02:23
  • I Will do it hhh :) – Hussein A Sahei Sep 17 '21 at 02:26

1 Answers1

1

I solved this by creating two projects

  1. Ids for 3rd-party authentication only or login with external login like (google or Facebook).
  2. Create an API project that calls the same database to manage users or a new registration

All API is protected by getting Token form ids. this same problem helped me