Oauth error 400() on this.app.login

Hello,

I have some kind of problem with oauth authentication. I tried to implement my own login page, but then I encountered this error on the this.app.login command.

Failed to load resource: the server responded with a status of 400 () [http://localhost:9191/sideufg/rest/v2/oauth/token]

Full authentication is required to access this resource unauthorized

What could be the reason of the problem?

Hi,
Did you use a basic authentication for your token request, as described, for example here?

I used the example of the custom login form of the documentation. (Login Form - CUBA Platform. Polymer UI Tutorial)

Screenshot_20181120_083151

Hi,

Did you use non-default client and secret options? If so, please make sure you configured REST API properly:

If it won’t help please provide a source code of custom logic on your front-end.

yes, I Use non-default client and secret options and I configured it according to the documentation, in the web module, in the file web-app-properties.

Follows the shell and login page attachment code
src.zip (5.5 KB)

Could you please check role of the user: if it’s DENYING you should enable REST API explicitly:

image