Skip to main content
Module

x/miauthjs/mod.ts>MiAuth

the wrapper for MiAuth on Deno/Node.js
Go to Latest
class MiAuth
import { MiAuth } from "https://deno.land/x/miauthjs@0.0.2/mod.ts";

Constructors

new
MiAuth(
origin: string,
param: UrlParam,
session: string,
)

Properties

private
origin: string

MiAuth constructor

origin: your on the instance url

param: url parametor. see UrlParam

private
param: UrlParam
private
session: string

Methods

private
buildParam(param: UrlParam): string

build for parametor of miauth authentication url when you incorrect parametor, thow UrlParametorError, but, when callback parametor incorrect do not thow that error

authUrl(): string

return miauth authentication url

getToken(): Promise<string>

return misskey api token when failed authentication, thow AuthenticationError