Base solution for your next web application

Activities of "jhoiby"

I'm trying to at least get a Facebook login to work in a default ABP template, but I am getting general error messages in the browser UI after clicking the Facebook button. When I search my entire project folder I'm not finding any file named "logs.txt", even though that is the filename specified in log4net.config.

What else do I need to do to enable logging in the Core Angular template? The documentation says logging should be enabled by default.

Thank you,

James

Hello!

I'm trying to get ASP.NET Boilerplate with Module Zero (both MVC and AngularJS version) to authenticate against our Office 365/Azure AD system, without success. I've been working on it for two months, bought books on Azure AD Authentication and sought much help from friends but I'm at the end of my rope and my project is stalled. (Thanks for letting me rant...)

First: Tried adding UseOpenIdConnectAuthentication in a method similar to your Facebook and Google auth code in Startup.cs. Result: Transfers to my O365 login page before displaying AspNetBoilerplate login page. On callback it gets stuck in a loop and doesn't display any registration or login option.

Second: Per another thread in this forum on Azure AD I rearranged the OWIN modules in startup.cs. Result: I get the login page, click on "Use OpenIDConnect", login on my Azure AD page, get sent to the callback, and get an HTTP 400.0 error that the antiforgery token is not present or is invalid.

Third: Copied the code from the other Azure AD thread very closely. Result: Same

At one point I had the callback seemingly working but the problem I had then was AuthenticationManager.GetExternalLoginInfoAsync() would return null. Since then I started from scratch and this time I'm not able to get even that far.

My current code for web.startup.configuration:

app.UseAbp();
            app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
            app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
            app.UseCookieAuthentication(new CookieAuthenticationOptions());
            app.UseOpenIdConnectAuthentication(
                new OpenIdConnectAuthenticationOptions
                {
                    ClientId = "9cf42fd3-48ee-4b37-b53d-(redacted)",
                    Authority = "https://login.microsoft.com/(mydomain).onmicrosoft.com",
                    PostLogoutRedirectUri = "https://localhost:44356/",
                    CallbackPath = new PathString("/Account/ExternalLoginCallback")
                });
            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                LoginPath = new PathString("/Account/Login")
            });
            app.MapSignalR();

I've tried what I can but I just don't have enough experience with OWIN to get this to work. I'm sorry to bother you with this but can you provide me with some guidance? With the exploding popularity of Office 365 and Azure AD it seems to me that Azure AD authentication would be a hugely useful feature for many of your users and would be a great feature to integrate into your codebase.

Thank you!

James

Showing 1 to 2 of 2 entries