[MM-37984] Allow Desktop App to authenticate via external providers outside of the app on supported servers (#23795)
* WIP * Add rate limiting for desktop token API * Missing mocks * Style fixes * Update snapshots * Maybe use an actual redirect link :P * Refactoring for tests * Add tests for server * Fix lint issue * Fix tests * Fix lint * Add front-end screen component * Component logic * Style changes * Quick style fix * Lint fixes * Initial PR feedback * Enable logging into the browser as well when completing the login process * Refactor to push more logic to the other component * Remove unnecessary helper code * Fix i18n --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5e3c03a0a8
Коммит
abdf4e58c3
@@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS DesktopTokens;
|
||||
@@ -0,0 +1,21 @@
|
||||
CREATE TABLE IF NOT EXISTS DesktopTokens (
|
||||
DesktopToken varchar(64) NOT NULL,
|
||||
UserId varchar(26) NULL,
|
||||
CreateAt bigint NOT NULL,
|
||||
PRIMARY KEY (DesktopToken)
|
||||
);
|
||||
|
||||
SET @preparedStatement = (SELECT IF(
|
||||
(
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.STATISTICS
|
||||
WHERE table_name = 'DesktopTokens'
|
||||
AND table_schema = DATABASE()
|
||||
AND index_name = 'idx_desktoptokens_createat'
|
||||
) > 0,
|
||||
'SELECT 1',
|
||||
'CREATE INDEX idx_desktoptokens_createat ON DesktopTokens(CreateAt);'
|
||||
));
|
||||
|
||||
PREPARE createIndexIfNotExists FROM @preparedStatement;
|
||||
EXECUTE createIndexIfNotExists;
|
||||
DEALLOCATE PREPARE createIndexIfNotExists;
|
||||
Ссылка в новой задаче
Block a user