refactor
This commit is contained in:
10
packages/backend/src/misc/token.ts
Normal file
10
packages/backend/src/misc/token.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { secureRndstr } from '@/misc/secure-rndstr.js';
|
||||
|
||||
export const generateNativeUserToken = () => secureRndstr(16);
|
||||
|
||||
export const isNativeUserToken = (token: string) => token.length === 16;
|
Reference in New Issue
Block a user