https://github.com/juanifioren/meteor-oidc-client
Generic OpenID Connect RP for Meteor applications
https://github.com/juanifioren/meteor-oidc-client
authentication login meteor oauth2 openid-connect
Last synced: 14 days ago
JSON representation
Generic OpenID Connect RP for Meteor applications
- Host: GitHub
- URL: https://github.com/juanifioren/meteor-oidc-client
- Owner: juanifioren
- Created: 2016-05-20T16:10:52.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-23T20:00:55.000Z (almost 9 years ago)
- Last Synced: 2025-03-30T02:51:06.763Z (about 1 month ago)
- Topics: authentication, login, meteor, oauth2, openid-connect
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Meteor OpenID Connect Client
Generic OpenID Connect relying party implementation for Meteor applications.
## Usage
### Setting Up
```
$ meteor add juanifioren:oidc-client
```Add your info provided by your OIDC Provider on a `settings.json` file.
```
{
"oidc": {
"authEndpoint": "http://localhost:8000/authorize/",
"tokenEndpoint": "http://localhost:8000/token/",
"userinfoEndpoint": "http://localhost:8000/userinfo/",
"clientId": "399291",
"secret": "a88720fb53545f129f4530aa6abd58cf"
}
}
```Manage configuration with the `service-configuration` package. Then create a file on server-side.
```
ServiceConfiguration.configurations.upsert({ service: "oidc" }, {
$set: {
authEndpoint: Meteor.settings.oidc.authEndpoint,
tokenEndpoint: Meteor.settings.oidc.tokenEndpoint,
userinfoEndpoint: Meteor.settings.oidc.userinfoEndpoint,
clientId: Meteor.settings.oidc.clientId,
loginStyle: "popup",
secret: Meteor.settings.oidc.secret
}
});
```Run your app.
```
$ meteor run --settings=settings.json
```### Launching Popup
Somewhere on a client-side script.
```
Meteor.loginWithOIDC({
requestPermissions: ['email']
}, function (err) {
if (err)
console.log(err);
});
```## Contributing
I love contributions, so please feel free to fix bugs, improve things, provide documentation. Just send me a pull request.