--
You received this message because you are subscribed to the Google Groups "Keycloak Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-dev/e143a815-7e0e-4dca-9db5-e55cb860b31bn%40googlegroups.com.
Oky you are looking for direct grant support, try the following code snippet.
```
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'client_id': '@clientId',
'grant_type': 'password',
'username': '@your_username',
'password': '@your_password'
});
var config = {
method: 'post',
url: 'https://{yourhost}/auth/realms/master/protocol/openid-connect/token',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
```
Thanks,
Lokesh
To view this discussion on the web visit
https://groups.google.com/d/msgid/keycloak-dev/08280298-1743-4870-a627-1549c63cefd8n%40googlegroups.com.