anvilresearch / connect

A modern authorization server built to authenticate your users and protect your APIs
http://anvil.io
MIT License
361 stars 86 forks source link

Change password / realm scope #338

Open PetrSnobelt opened 8 years ago

PetrSnobelt commented 8 years ago

Hello, I try to implement change user's password functionality in my app. I try use patch route /v1/user/:userid/password, but when I try use it, it return 'Forbidden'.

When I look at the sources, it looks like token should have 'realm' scope https://github.com/anvilresearch/connect/blob/master/routes/rest/v1/users.js#L25

But when I register new user (which don't have 'authority' role) I am not able to obtain access token with realm scope. If I log-in using account with authority role with same config - token with realm scope is returned

I use anvil-connect.js to get access token.

What could be wrong?

Thanks

PetrSnobelt commented 8 years ago

If I understand it correctly, there are these routes for administrator and not for the user. If so, what is recommended way for user to change password?