CAS Authenticate through another subdomain - cas

At my place of employment, we do not control what applications are CAS authorized, but have existing CAS authorization for an application hosted at foobar.com/app-one.
When a user signs into this, they are correctly authenticated, and are served the application.
Recently, we have added a new application, foobar.com/app-two. Unfortunately when signing in, the user is served a message "Application Not Authorized to use CAS". For reference, both of these have CAS server validation disabled.
However, if a user accesses foobar.com/app-one, authenticates themselves, then navigates to foobar.com/app-two, the page is served without issue.
How would I have an unauthenticated user access app-two, get directed to the authorized login component of app-one, and then be redirected to app-two?
EDIT: Could I pass a new redirect location in my request or something similar?

Related

PingFederate login mechanism - authorization code flow

My application is configured to get the access_token from the authorization code sent by the IDP. Below is the flow:
I request an organization application(sp).
Organization application redirects me to the IDP login page, Here I enter the username and password.
After successful authentication, IDP redirects me to the organization application URL with auth code appended in the request param.
Now organization application saves this code in the application session and then gets the access_token using the auth code provided by IDP.
if I again request the organization application(SP), the application checks if the session has the auth code, and if it has, it will not redirect me to the IDP login page to get the auth token. This is how the application works in the context of login.
Now if the session expires, and we request the organization application, this time application directly redirects me to the IDP to get the authorization code, without a username and password.
My question is how this magic is happening, How does it get the user info from my browser?
I thought it might be using cookies to get user info, but after deleting all cookies from the browser, it could still get auth code without asking me to put username and password.
From where it is getting the user information? I tried it with chrome and edge browsers and the result is the same for both.
Using the PingFederate for IDP.
The IDP (or authorization server, or both, depending on the exact setup) issues a session cookie after the user authenticates. If you perform an RP initiated logout, or clear all IDP cookies, this force a re-login.
If the IDP session cookie remains valid, the user will not be prompted for credentials the next time they are redirected to authenticate. Eg if the application session / token lifetime is shorter than the IDP session time.
Often this is best resolved by configuring the app's refresh token and IDP session time to be the same. Applications can also send the OpenID Connect prompt=none parameter at any time to force re-authentication.

ReplyUrl of Authorization Server not found

I am self-hosting the api management developer portal using a custom domain name via a Azure CDN and storage account. Authentication is provided using Azure AAD B2C. We have configured an authorization server to request access token using authorization code flow. When we access the managed site it correctly requests the access token and processes it using the reply url "https://apim-instance-name.developer.azure-api.net/signin-oauth/code/callback/name-of-auth-server", however, when we use the custom domain name it returns 404 not found when AAD B2C redirects the browser to https://custom-domain-name.com/signin-oauth/code/callback/name-of-auth-server". Is there something I'm missing?
Screenshot of redirected browser not finding reply url

I need to implement authentication on my web app

My scenario:
A Google Apps Script Web Application served from its server-side index.html to fill the students score on a spreadsheet.
The script is embedded as iframe in a website page hosted on Firebase.
I need a way to protect this web app and make it only accessible for specific users via Firebase Auth. username and password.
It's not possible to protect static web content with Firebase Auth. What you can do instead is is protect access to your backend using a ID token provided by the client to the server, and the server can validate that the user can take action. You would use the Firebase Admin SDK on the backend to validate the token.

Why does the href="http://...." direct me to "https://..."?

Alright, this is the case:
I have a website. When not logged in, it is a http connection.
On my homepage I have a link to another site:
www.somesite.com
So far so good, when pressing the link it goes to the site.
But when I log in to my website, I have a secured connection (https).
Now, when I press the same link, it opens https://www.somesite.com although I have the link hardcoded as http in my code. And the somesite.com does not provide a https connection, so the browser is complaining.
How is this possible and how do I get the browser to just follow the hardcoded url?
Many websites support a non-secured (http) connection up to the point of user authentication. At that point, many sites will redirect to a secured (https) authentication mechanism and conduct all subsequent communication with the authenticated user over https.
The site you are accessing is being redirected by the server to the secure connection. That is why when you access the site via your link via http, the server redirects you to the secure site. If you are familiar with the dev tools in your browser, you can probably follow a network trace of the exchange between you and your site and see the redirect at some point in the communication exchange.

user reamins login in social networking site using my application

I want to develop an app. I want to integrate linkedIn account with my app. As the user logs in my app he one authenticate his linkedIn account and next time whenever he logs in he automatically login with linkedIn also
How I can achieve this.
either saving the id and password of user or the only access token???
After allowing a user to connect with LinkedIn (via their OAuth API), you need to store the LinkedIn OAuth token in your database, separate from the user's session. Then when the user logs in again you can just get the token from your database and continue making authenticated requests to LinkedIn.