How to access "/oauth2/authorization/azure" via my spring boot application which is located in AWS?

Narae Hyeon 0 Reputation points
2023-05-11T13:19:17.69+00:00

Hi all,

I faced an issue when deploying my app on the AWS Elastic Beanstalk server.

The environment includes:

-Spring boot Framework version. 3.0.6 + nginx

-com.azure.spring version. 5.0

-Cloud services: AWS Elastic Beanstalk , load balanser

I'm using a load balancer to set an SSL certificate. When a user accesses the site URL starting with "http://", it redirects to "https://" (301).

User's image

After setting this, the website redirects to "https://" with https sign (User's image

)

However, when I check the URL in the application code, it shows "http://".

So, it redirects to "http://{myDomain}/login/oauth2/code, not "https://{myDomain}/login/oauth2/code.

In the access log of Nginx, it looks like an unauthorized access attempt.

User's image

Could anyone help me?

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
5,496 questions
0 comments No comments
{count} votes