This package is an integration between tecsinapse-keycloak-js and meteor accounts package.
Use meteor add tecsinapse:keycloak-meteor
to add this package in your project.
This package use service-configuration
to save your keycloak options. Create a settings.json with options like this,
{
"keycloak": {
"realm": "yourRealm",
"clientId": "yourClient",
"urlServer": "https://auth.yourKeycloak.com",
"adminUsername": "admin@yourUser.com",
"adminPassword": "yourAdminPass"
}
}
and write this code in your server:
import {Accounts} from 'meteor/accounts-base';
Accounts.keycloakConfig(Meteor.settings.keycloak);
Call Accounts.loginWithKeycloak(username, password)
;
Call Accounts.logoutKeycloak()
;