Hey @danilvoe, thanks for the question.
Just to make sure I understand -- you're interested logging in through a service so that a user doesn't have to enter login and password information each time. Is that correct?
If so, I encourage you to take a look our OAuth 2.0 documentation. Mattermost 3.4.0 and later allows Mattermost to authorize API requests from external applications.
The authorization allows users with an account on a Mattermost server to sign in to third-party applications. You can find a sample OAuth2 Client Application for Mattermost here to test the functionality.