We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misskey-jsのAPIClientに、MiAuthでcredentialを取得できるメソッドが欲しいです。 案:
type MiAuthSession = { url: string; getToken(): Promise<boolean>; // 成功時true 失敗時false } export class APIClient { // ... public createMiAuthSession(): MiAuthSession { const sessionId = uuid(); return { url: `${this.origin}/api/miauth/${sessionId}/check`, getToken() { const { token, result } = /* fetch処理 */ ; if (result) this.credential = token; return result; }, }; } }
MiAuthをより簡易に行えるようにするため。 現状だとAPIClient.requestでもある程度簡易化できますが、miauth/${string}/checkがtype Endpointsに含まれていないため型を捻じ曲げる必要があります。
miauth/${string}/check
type Endpoints
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Summary
misskey-jsのAPIClientに、MiAuthでcredentialを取得できるメソッドが欲しいです。
案:
Purpose
MiAuthをより簡易に行えるようにするため。
現状だとAPIClient.requestでもある程度簡易化できますが、
miauth/${string}/check
がtype Endpoints
に含まれていないため型を捻じ曲げる必要があります。Do you want to implement this feature yourself?
The text was updated successfully, but these errors were encountered: