oidc-react
oidc-react copied to clipboard
[Feature Request]: Add 'metadata' to the available parameters.
I'm trying to work with the Slack Open ID and have run into an issue; they're not serving the proper CORS headers on their discovery endpoint https://slack.com/.well-known/openid-configuration
The project that this library is a wrapper for makes an alternative available with the metadata parameter but it doesn't seem to be supported yet. I added it and am making a pull request, contribution notes mentioned opening a ticket first!
One note, you'll still need to send an authority value over. This configuration for Slack is now working for me after the change.
onSignIn: async (user) => {
alert('You just signed in, congratz! Check out the console!');
console.log(user);
window.location.hash = '';
},
authority: 'https://slack.com',
metadata: {
issuer: 'https://slack.com',
authorization_endpoint: "https://slack.com/openid/connect/authorize",
token_endpoint: "https://slack.com/api/openid.connect.token",
userinfo_endpoint: "https://slack.com/api/openid.connect.userInfo",
jwks_uri: "https://slack.com/openid/connect/keys",
},
clientId: process.env.REACT_APP_SLACK_CLIENT_ID,
responseType: 'code',
redirectUri:
process.env.NODE_ENV === 'development'
? 'https://localhost:3000/slack/authenticate'
: 'https://localhost:3000/slack/authenticate',
};
Pull request opened here https://github.com/bjerkio/oidc-react/pull/715