How can i have customized SPA login page in Identity Server (duende identityserver) - asp.net-core

I'm looking for a way to have a customized SPA (react/angular) login page beside of my Duende Identity Server API (developed in ASP.NET 6.0)
I googled it all day and just i found this article:
https://medium.com/#piotrkarpaa/using-spa-react-angular-ui-with-identity-server-4-dc1f57e90b2c
Which is not working...

Okay, so I ran into same situation few days ago, and it was sorted out in a tricky way. And also I landed on this same article you mentioned.
Duende IdentityServer comes with .cshtml pages. The frontend developer designed the same login page (as of reactjs frontend) in .cshtml and inserted that in IdentityServer's login page. Afterwards the workaround was. When user lands on reactjs login page. It automatically redirects to IdentityServer's login page. Though it is not the best approach but a work around that solved our problem.
Background;
Microservices project
.net 6 api (backend)
reactjs (frontend)
Duende IdentityServer 6 for authentication
I hope this helps you out. Goodluck :)

Related

.NET Core 5.0 error 400 after redirected to login page from Quickbooks OAuth, issue resolves if i revisit the Url by pressing enter

I have a .NET Core 5.0 application which authenticates & integrates Quickbooks with OAuth and then redirects to the application login page. When I click login, I get an http 400 error and cookie for ASP.NET Core Identity is not created, yet but if select the url and press enter then it just works fine, anybody has any suggestions on this?
I tried a couple of things like adding authorize in that controller form where I am redirecting and also tried several cookie settings I found but nothing worked so far

Auth0 Gmail SS0 doesn't work when I enable Customize Login Page (using auth0 asp.net mvc sample)

This is my ASP.NET MVC sample
Now I'm clicking log in button and it redirects me to the Auth0 custom login page
Now, I'm clicking login with the google button and I already signed in to my Gmail account but it doesn't bring token, and no redirection
URL : https://ishkyteck.us.auth0.com/login?state=hKFo2SBJRWVZQ1F2dk1WeW91Ry1sdVh2SklnQWhVemZjdS1YcKFupWxvZ2luo3RpZNkgb1FGXzRoYjR5a2phTmU2dUNEMGFUcmk0YXN4a1dRYjmjY2lk2SBTbjdld3VBcWk4Y3JyWFVTcjQ2bkYxSEJHZmF2VGl0cg&client=Sn7ewuAqi8crrXUSr46nF1HBGfavTitr&protocol=oauth2&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2F&response_type=code%20id_token%20token&scope=openid%20profile&response_mode=form_post&nonce=637732441711041622.NjQ3MWUxZTYtMTM4Yy00OTQ1LWEyMzUtMTBmN2Y5NjQ5OWVkMzNjYjllMTItNTMwYi00NmIyLWIyMzEtNTY0MjQzNDk1ODll&audience=https%3A%2F%2Fishkyteck.us.auth0.com%2Fapi%2Fv2%2F&x-client-SKU=ID_NET461&x-client-ver=6.7.1.0
and it hits the AuthorizationCodeReceived method but does not bring the token
Please, auth0 community developer look into this bug and resolve. I'm using your provided asp.net MVC sample but it doesn't work.
Sample I downloaded from : https://github.com/auth0-samples/auth0-aspnet-owin-mvc-samples/tree/master/Quickstart/01-Login/MvcApplication
Please help me. Thank you!!
Issue reproducing sample (my auth0 Gmail SSO sample),
https://drive.google.com/file/d/1aHXDCLZjcXth2u1KzON7hhhzKOIv6B0b/view?usp=sharing
When I enable this button, Gmail login does not work in the auth0 universal custom login page
auth0 custom universal login page

ASP.Net Core MVC IdentityFrameWork Not Working

I have an ASP.Net Core MVC application which uses IdentityFrameworkCore for the login which seems to work fine but I can access other web pages without login in by typing the URL in.
Also it is loading my _Layout page with my login page showing menu items.
Can someone please help on how I call my login page without _Layout and how do I prevent users from bypassing the login.
Many Thanks,

React SPA app with .net core backend and .net identity

I basically have the same question as what is detailed here: Login redirect with asp.Core 2.0 and React. But that post never got an answer.
I've searched quite a bit and pretty much my problem is also touched on here here: https://github.com/aspnet/JavaScriptServices/issues/1440
I want to create a react front end application, but use .net core for the backend. I've used the .net core template with react redux as my boilerplate. I've also configured the .net identity on my backend. So I can actually use [Authorize] on my api calls and it works. By this I mean that if someone is authenticated the api returns data and if no one is authenticated it returns whatever the default redirect page is. I can confirm this by looking at the response on my chrome debugger and I see that it is showing the html for the register page which I've defaulted my login path to in configureapplicationcookie options.
The boiler plate is setup to serve up pages from the react client folder and uses react router. Therefore, I cannot set up any links to pages on my server. However, I'm able to manually navigate to my server pages for example /Account/Login and successfully login. My api calls through the links on the react front end then seem to work just as I would like.
What I would like to do is:
make calls from my react application to my server api
upon unsuccessful access to any api endpoint, redirect the user/request to my register page on the .net core server
have the user register and/or login and then redirect them to the route they came from through the react application.
Is this possible? Is it advisable?
I understand that you can manage all this on the front end using IdentityServer as detailed here: http://docs.identityserver.io/en/release/quickstarts/7_javascript_client.html. However, if all the infrastructure can be quickly spun up in .net and I can leverage the authentication templates, then I want to experiment with that setup and save time. Plus if this is feasible, why bother doing the setup on the front end using a 3rd party login provider? What am I missing?

Share login status between WordPress blog and RoR app?

I'm using devise for authentication in my Rails application. I have a WordPress installation for the blog portion of the project (because I need several WP plugins).
Is it possible to integrate the user authentication from the RoR application into the blog, so that when someone logs into the app, then goes to the blog, their signed it status remains and shows up.
If that's possible, it should also be possible for them to log in while viewing the blog and then go straight to their page when they go to the app, right?
You have to store session information about WP and Rails session in one storage and check WP auth cookies on Rails application.