Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Unsupported connection strategy oauth2 #266

Closed
Hangsolow opened this issue Sep 9, 2020 · 3 comments · Fixed by #267
Closed

Unsupported connection strategy oauth2 #266

Hangsolow opened this issue Sep 9, 2020 · 3 comments · Fixed by #267
Labels
enhancement New feature or request

Comments

@Hangsolow
Copy link

Description

The Oauth2 provider is not supported. When it is used it throws the following error
Error: 400 Bad Request: Payload validation error: 'Missing required property: options'.

New or Affected Resource(s)

  • auth0_connection

Potential Terraform Configuration

basically just taking the OIDC configuration and just use the fields needed by the generic oauth2 connection

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.
resource "auth0_connection" "my_con" {
  name                 = "my_con"
  strategy             = "oauth2"
  realms               = ["my_con"]
  is_domain_connection = false
  enabled_clients      = ["xxx"]
  
  options {
    client_id     = "xxx"
    client_secret = "xxx"
    scopes        = ["openid", "profile", "email"]
    token_endpoint         = "https://xxx.com/oauth2/token",
    authorization_endpoint = "https://xxx.com/oauth2/authorize"
    custom_scripts = {
      fetchUserProfile = "..."
    }
    custom_headers = {
      "x-header" = "xxx"
    }
  }
}

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@Hangsolow Hangsolow added the enhancement New feature or request label Sep 9, 2020
@Hangsolow
Copy link
Author

I would be happy to help implementing this, I just need someone to point me in the right direction as my Go skills are a bit rusty 🙂

@mcalster
Copy link
Contributor

This is a feature that will be very useful for us as well. It seems weird that this is not supported. A bug maybe?

@mcalster
Copy link
Contributor

This is a feature that will be very useful for us as well. It seems weird that this is not supported. A bug maybe?

It seems that the oauth2 connection strategy is not implemented in the auth0 Management Go client.
https://github.com/go-auth0/auth0/blob/master/management/connection.go.

Created issue for that: go-auth0/auth0#139

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants