How I can set username in console to go after OAuth2 auth?

I want to set name here http://joxi.ru/vDr818yhoVMgm6

Actual: -Authenticateduser

Expected: -

I saw that in twitter provider.

You cannot set it today. We make some guesses sometimes, but since this is not a standard part of the OAuth specification, it isn’t always right. We’ll consider more customization options for this in the future.

1 Like

And how does the twitter api do it? If it is some special field - no problem, I can return any.

You can see an example of Twitter’s token response here:

https://dev.twitter.com/oauth/reference/post/oauth/access_token

They use “screen_name”, which if you return with your token, will likely be picked up by the Console.

1 Like

So, if I use oauth2, I have to return screen_name with access_token on last step or there is some other scenario?

Yes, that’s the idea. Though we didn’t build it to work this way specifically, it’s worth a try (note that Twitter uses OAuth 1.0a not OAuth 2).