(opts: AuthClientOptions = {})
| 95 | private readonly onRefresh?: (refresh_token: string) => Promise<OAuthTokens>; |
| 96 | |
| 97 | constructor(opts: AuthClientOptions = {}) { |
| 98 | this.base = (opts.baseUrl ?? apiBaseUrl()).replace(/\/+$/, ""); |
| 99 | this.fetchImpl = opts.fetchImpl ?? fetch; |
| 100 | this.onRefresh = opts.onUnauthenticatedRefresh; |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * `GET /v3/users/me`. Throws `ErrUnauthenticated` on 401, `ErrApi` |
nothing calls this directly
no test coverage detected