question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OAuth2 login doesn't seem to work

See original GitHub issue

I have Scoold running locally. I wanted to add OAuth2 login (using Azure Active Directory as IdP). Here’s the config that I’m using:

para.env = "production"
para.endpoint = "http://para:8080"
para.access_key = "app:para"
para.secret_key = "{para-key}"

para.password_auth_enabled = false

# minimal setup
para.oa2_app_id = "{my client ID}"
para.oa2_secret = "{my secret}"
para.security.oauth.authz_url = "https://login.microsoftonline.com/{my tenant ID}/oauth2/v2.0/authorize"
para.security.oauth.token_url = "https://login.microsoftonline.com/{my tenant ID}/oauth2/v2.0/token"
para.security.oauth.profile_url = "https://graph.microsoft.com/oidc/userinfo"
para.security.oauth.scope = "openid email profile"

# extra options
para.security.oauth.parameters.id = "sub"
para.security.oauth.parameters.email = "email"
para.security.oauth.parameters.name = "name"

# Sets the string on the login button
para.security.oauth.provider = "Login using AAD"

# Enable/disable access token delegation
para.security.oauth.token_delegation_enabled = false

When I run Scoold, I see this:

image

As I’d expect, only AAD login is enabled. However, clicking the button has no reaction. The HTML looks like this:

image

The button points to #, which basically does nothing. What am I doing wrong?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
marcinjahncommented, Mar 30, 2021

I figured that out - I added para.app_name = "Scoold" to my Scoold config. It is missing in the Docker Compose example. I’ll add it in another PR. Now, the login flow worked without any error.

1reaction
albogdanocommented, Mar 30, 2021

Users won’t have to refresh the login page because that bug rarely happens, usually when you have the cached JS file and change configuration. Using the root app app:para for Scoold is not recommended. You should create a separate app app:scoold or similar. Yes, Para creates that JWT. The problem comes from the fact that para-auth is a cookie used by Para itself for a different purpose and Scoold usually works with the scoold-auth cookie.

Btw, would you like me to add the Azure Active Directory setup procedure to README.md? I see that you have instructions for Okta, AAD setup is a bit different.

Sure, go ahead! That would be helpful to others as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OAuth2 not working : Authentication failure · Issue #946 - GitHub
Using @saibot94 's OAuth2. 0 and SSO implementation, TheHive fails to log in and/or create account using OAuth2. 0. Once I click on...
Read more >
Google Oauth login window doesn't work properly
Google Oauth login window doesn't work properly · On my site there is a button by clicking on which the user should be...
Read more >
oauth2 provider doesn't seem to work (#13516) · Issues - GitLab
I'm using Gitlab CE 8.4.3. I'm trying to use Gitlab as an Oauth2 provider. I created a new application. I've got my application...
Read more >
OAuth2 for gmail Not Working | Thunderbird Support Forum
With OAuth2 authentication you cannot use app passwords, you'll have to use your main Google account password. You should delete any app ...
Read more >
Facebook&Google oauth2 service not working moodle 3.3
Because you are trying to login with a Oauth account that is not yet linked to a moodle account, it can't log you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found