System Information
- Strapi Version: V4.1.7
- Operating System: Node 16 Alpine Docker
- Database: Postgres
- NPM Version: 8.5.5
Dear community,
I’m get frustrated getting a custom provider to work. My custom provider (KeyCloak) works perfectly on v3. Now when I setup a clean installation of strapi v4 and try to implement a new custom provider I get ERR_INVALID_REDIRECT
of my Chrome Browser.
http://localhost:1337/api/connect/keycloak
This is my folder tree:
providers-list.js:
case 'keycloak': {
const keycloak = purest({
provider: 'keycloak',
config: {
keycloak: {
'https://mykeacloakprovider.com/auth/realms/Innowo': {
__domain: {
auth: {
auth: { bearer: '[0]' },
},
},
'{endpoint}': {
__path: {
alias: '__default',
},
},
},
},
},
});
keycloak
.query()
.get('protocol/openid-connect/token')
.auth(access_token)
.request((err, res, body) => {
if (err) {
callback(err);
} else {
callback(null, {
username: body.username,
email: body.email,
});
}
});
break;
}
grant-config.js
keycloak: {
enabled: false,
icon: 'key',
key: '',
secret: '',
callback: `${baseURL}/keycloak/callback`,
scope: ['email'],
},
If I could see which redirect Strapi tries to implement that would help me a lot. Does any of you see any issue with my configuration?
I was following this tutorial for doing the migration: