grails-spring-security-core icon indicating copy to clipboard operation
grails-spring-security-core copied to clipboard

Connect to multiple providers

Open ricvargas opened this issue 6 years ago • 0 comments

Hi! Is there a way to connect to multiple OAuth2 providers with this plugin?

I'm creating a sample project to connect to 2 (or more) different OKTA accounts, this is something like what I'm trying to do:

application.yml (inside my grails app):

plugin:
    springsecurity:
        oauth2:
            active: true
            registration:
                roleNames: ['ROLE_USER']
            providers:
                okta:
                    api_key: 'XXXXXXXXX'
                    api_secret: 'XXXXXXXXX'
                    userInfoUrl: 'https://dev-XXXXXXXXX.okta.com/oauth2/default/v1/userinfo'
                    authorizeUrl: 'https://dev-XXXXXXXXX.okta.com/oauth2/default/v1/authorize'
                    tokenUrl: 'https://dev-XXXXXXXXX.okta.com/oauth2/default/v1/token'
                    scopes: 'email profile openid'
                okta:
                    api_key: 'YYYYYYYYYY'
                    api_secret: 'YYYYYYYYYY'
                    userInfoUrl: 'https://dev-YYYYYYYYYY.okta.com/oauth2/default/v1/userinfo'
                    authorizeUrl: 'https://dev-YYYYYYYYYY.okta.com/oauth2/default/v1/authorize'
                    tokenUrl: 'https://dev-YYYYYYYYYY.okta.com/oauth2/default/v1/token'
                    scopes: 'email profile openid'

Thanks and regards!

ricvargas avatar Aug 18 '19 18:08 ricvargas