[MM-37984] Allow Desktop App to authenticate via external providers outside of the app on supported servers (#24140)
* [MM-37984] Allow Desktop App to authenticate via external providers outside of the app on supported servers * PR feedback * Add support for mattermost-dev protocol for development use * Update server/channels/db/migrations/postgres/000110_create_desktop_tokens.up.sql * Fix silly typo * Update server/channels/db/migrations/postgres/000110_create_desktop_tokens.up.sql * Remove storage of client token, only validate it on the client * Update migrations * Add concurrently create index * Remove CONCURRENTLY for now * Fix issue with changing history * Remove old migration * Use idempotent statement to drop old index * Remove reference to old table
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
105fa4a195
Коммит
a3b194581f
@@ -755,6 +755,18 @@ export default class Client4 {
|
||||
return profile;
|
||||
};
|
||||
|
||||
loginWithDesktopToken = async (token: string) => {
|
||||
const body: any = {
|
||||
token,
|
||||
deviceId: '',
|
||||
};
|
||||
|
||||
return await this.doFetch<UserProfile>(
|
||||
`${this.getUsersRoute()}/login/desktop_token`,
|
||||
{method: 'post', body: JSON.stringify(body)},
|
||||
);
|
||||
};
|
||||
|
||||
loginById = (id: string, password: string, token = '') => {
|
||||
this.trackEvent('api', 'api_users_login');
|
||||
const body: any = {
|
||||
|
||||
Ссылка в новой задаче
Block a user