appcues / ueberauth_okta

Okta strategy for Überauth
MIT License
9 stars 18 forks source link

I can't add scopes? #36

Closed ryanwinchester closed 2 weeks ago

ryanwinchester commented 9 months ago

No matter what I try, the scope in the url params is always "openid email profile"

How can I override this to add scopes?

In the docs it says

oauth2_params: [scope: "openid email profile"]

but if I add that and add scopes it still doesn't change.

I've tried in both

config :ueberauth, Ueberauth,
  providers: [
    okta: {Ueberauth.Strategy.Okta, [
      oauth2_params: [scope: "openid email profile okta.users.read.self"]
    ]}
  ]

and

config :ueberauth, Ueberauth.Strategy.Okta.OAuth,
  okta: [
    oauth2_params: [scope: "openid email profile okta.users.read.self"],
    site: "https://[***].okta.com",
    client_id: "[***]",
    client_secret: "[***]"
  ]

As well as every other wording or combination I can think of...

andyleclair commented 6 months ago

Huh, interesting! We took this lib over and I know there was some... funky behavior across some previous versions that got rolled back. Let me take a dive into the code and see if there's a cleaner way of handling this. Having opts and params is sort of an antipattern IMO, maybe we can clean this up a bit

StephenTurley commented 6 months ago

Should these be injected in the request phase based on the resource being requested?