We are creating an mattermost chat application for iOS and Android (Native). We have been using session based login with login_id and password for login. Now, we want to use oauth for authentication. How can we create mattermost OAuth post request with username, password, grant_type, etc. so that I can login into the mattermost system without need of going through login page of mattermost as intermediary?
I’m not sure if I completely understand what you’re looking for but if you make the OAuth app “trusted” when you register it with Mattermost, then it does not require the user to go through the grant process and click allow. The user will still need to log in to Mattermost as part of the OAuth flow. There’s no way around that since that’s core to the OAuth flow. This will only need to be done the first time, when giving the OAuth app access to a user.
If you’re looking for a way to access an account without having to go through the OAuth flow, you could use personal access tokens