As explained in other topics on this forums that auth flow is currently not for public use, instead make use of Discourse User API keys
You can use the session_info
scope to get information about the logged in user. See other topics on this forum, FiveM source code or this repository for examples.