Other webpage links(not acs) are not redirecting to IdP authentication - saml-2.0

Browsing the acs page(SAML) gets redirected to the IdP authentication.
But, if I browse the other webpage links directly (not from home page) then it loads the page without redirecting to IdP authentication.
Any help on this?

Related

How to authenticate Gatsby Site for all pages using passport?

I have a Gatsby-React application in which I have enabled passport authentication with express server. How can I enable the passport authentication for all the pages for my gatsby application. The folder structure is as follows
app.js //Express server using passport stratagy
src/pages/welcome //Passport authentication is called when navigating from this page to profile
src/pages/profile //redirects to this page after authentication
/about //No Authentication
/index.js //No Authentication
src/components //My components folder
gatsby-node.js
...
As you may noticed that when we try to navigate to profile page from welcome page it authenticates by redirecting to the express (app.js) server strategy. Subsequently passport callback redirects to the profile page and it receives the user information. First wrong thing with this approach is that the app allows me to visit url.com/profile page when directly giving the url.com/profile in the address bar (Obviously the profile page will not have the user information).
To handle this I'm planning to give authentication for all the pages (including home page, about and welcome). So how can I effectively authenticate all the pages (if not authenticated).

Azure active directory redirects to landing page always

So, I'm developping a react app with Azure Active Directory authentication. The react app internally uses HashRouter. My url looks like this
https://example.com/#/
Now when the user clicks on this link from an email he would go through the azure authentication and if authorized will be redirected to the landing page which is
https://example.com/#/
However, if the user clicks on a link that looks like https://example.com/#/xyz - this still redirects to https://example.com/#/ and not to the page xyz. I think this is an issue with incorrect replyurls but I'm not sure.
Any help would be appreciated!!

How to configure the redirect to OpenAM IDP with Spring Security SAML 2.0 without discovery?

I have created the circle of trust between the service provider and the openam IDP. The issue that we are facing is that I am always redirected at the select provider interface. What we want is that the user is been redirected directly for login and authenication to the IDP.
Here is the example used:
https://github.com/spring-projects/spring-security-saml/tree/2.0.0.M11/samples/boot/simple-service-provider/src/main/java/sample/config
Based on this I am redirected to the IDP select page, and I want to get redirected to the IDP login page for authentication.
If you only have one IdP in the list for bean id="metadata" this IdP will be used.

Redirect to dashboard from home page based on user cookie

What I am trying to accomplish should be straight forward but since I have no experience in web development I would be more than happy to get some insights on best practices to accomplish user redirection from home page to dashboard if user is logged in.
Home page is a static WordPress site which is run in a docker container.
Dashboard is a single page application developed with AngularJS.
Nginx is used as a reverse proxy.
Authentication is basically a JWT. When user loggs in JWT is stored in Cookie.
If cookie is set user should be redirected to dashboard. Otherwise home page should be returned.
Should I configure Nginx to check for a cookie when accessing domain.com/ and redirect to app.domain.com if cookie exists?
what you are describing is a scenario where you need to go to home page and check whether User is Authenticated there, and redirect -before showing the homepage- if the user is authenticated from within the homepage code.

Redirect back from Service Provider to idP

I am using Kentor.AuthServices to implement Service Provider in a Web Forms application. I am seeing the SP redirect to idP and then POST the SAML to idP. However, it gets redirected back to idP again. I am guessing some configuration is not right, but not able to track it down.

Resources