Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "ribbo"

Hi, I have upgraded to 4.1.4 and see the Single Sign On method via a temporary token, but it is the other way round than I hoped. It still uses all the Angular Login and then passes back for Sign Sign On to the MVC site. Is it possible to do it the other way around and login via MVC and then pass Single Sign On Token across to the Angular project?

Thanks, Matt

You are 100% right, I did not have Git installed on the machine and Bower was throwing an error due to this trying to restore. Once Git was installed Bower loaded all required components. I am sure its the same issue for the other person above.

Thanks!

This is from Web.Public in the Angular project

Same issue with Angular in the Public site project. Some of the files look to be under "browser_components" but not all.

Great news, will keep an eye out on the repository.

MVC Core + JQuery solution works perfect.

Core + Angular 4 works but fails to get externallogindetails on call back (this is by calling MVC controller directly in browser not interacting with Angular at all). Assumed Cookie issue.

I have just added a new controller to Web.Host called "AuthenticationController", which is basically the same as the AccountController from the MVC Project.

So that raises a big question and where maybe my issue is. This controller is sitting within Web.Host, I have not added a whole new project called Web.Mvc. Is there differences in Web.Host VS Web.Mvc that would stop this from working?

So my StartUp/AuthConfigure.cs has this code in Web.Host app.UseGoogleAuthentication And the controller added to Web.Host. The controller\login works perfectly until ExternalLoginCallback is called with _signInManager.GetExternalLoginInfoAsync just gets NULL. I am now wondering if this is because it is all sitting within the Web.Host project and not a new Web.Mvc project from the MVC solution.

Is there a way to get Web.Host to work for this as I don't really want to have a separate project that needs to be run (1 for API and separate 1 for MVC).

Thanks, Matt

Also when is your next release out? As it sounds like it will have exactly what I am looking for in it.

Thanks, Matt

Thanks for the info. Your option here is exactly what I am trying to do "If you can login use with the MVC side and register the new user, then you may try to pass a temporary token to the angular side. Angular then requests to server with the token, authenticates and gets an actual token."

The problem I am having is that the function call signInManager.GetExternalLoginInfoAsync() is returning NULL. This is not using the Angular side at all, just MVC domain\url directly. So all communication is within the same domain, but for some reason it some back NULL. This is for Google login as well for testing. Everything works correctly within the actual MVC package when I download it. So wondering if there is any setting I need to change for the Angular downloaded package?

Thanks, Matt

Hi Hikalkan, Would love some further guidance on this.

Thanks, Matt

That makes sense as all my research pointed to Cookie Authentication not being setup correctly in StartUp used to get the External Login detail. While I understand the reason in terms of having login via Angular needing Token Authentication. Is there a way to enable Cookie Authentication for the MVC side so this flow works and also have Token Authentication at the same time in the same solution? There isn't any JS library I can find provided by Strava which means implementing my self (which I would prefer not to do same reason as you have for Microsoft).

The flow I was thinking (confirm if this will or won't work), if I can turn on Cookie Authentication for MVC in the same project along side :

  1. User hits Angular Client where there is a "Sign in to Strava" button eg. <a class="postlink" href="http://www.mysite.com">www.mysite.com</a>
  2. Button takes them to login.mysite.com/login/strava. This will be a separate subdomain where the API\MVC is.
  3. MVC takes over OAuth login and returns them to login.mysite.com/login/ExternalLoginCallback
  4. ExternalLoginCallback gets details via Cookie Authentication with signInManager.GetExternalLoginInfoAsync(); and registers the user if it doesn't exist
  5. If user exists login via Token authentication and return them back to <a class="postlink" href="http://www.mysite.com">www.mysite.com</a> Angular site logged in with the Token

The flows seems to be almost the same as the old .NET\Angular JS (before Angular 2 project) where MVC was used for authentication and Angular for the rest. Currently I have everything above working up to step (4) where it fails to get the LoginInfo due to the cookie authentication. If you can tell me how to turn on Cookie Authentication I think everything will work for me.

Thanks, Matt

To clear 1 thing up... when I talk about your MVC Project, I mean the "ASP.NET CORE MVC & Jquery". I have essentially copied over the AccountController to manage the external OAuth login.

Showing 11 to 20 of 25 entries