Function: authorize()

Call Signature

authorize(options): Promise<Account>

Authorize the user on the Dasha platform, returning an Account object with their credentials.

When callback is called, it should open the provided authUrl in a browser window. There will be a login form that, when the user logs in, redirects them to redirectUri. It should then return the fragment (hash) part of the URI.

This function is only implemented for Node.js.

Parameters

options

callback

(authUrl) => Promise<string>

insecure

boolean

whether to user non-TLS-encrypted connections

redirectUri

string

responseType

"fragment"

server

string

an endpoint to use for Dasha APIs

Returns

Promise<Account>

Call Signature

authorize(options): Promise<Account>

Authorize the user on the Dasha platform, returning an Account object with their credentials.

When callback is called, it should open the provided authUrl in a browser window. There will be a login form that, when the user logs in, redirects them to redirectUri. The caller must listen at the provided URI with an HTTP server and return the first request that comes.

This function is only implemented for Node.js.

Parameters

options

callback

(authUrl) => Promise<IncomingMessage>

insecure

boolean

whether to user non-TLS-encrypted connections

redirectUri

string

responseType

"form"

server

string

an endpoint to use for Dasha APIs

Returns

Promise<Account>

Found a mistake? Let us know.

Enroll in beta

Request invite to our private Beta program for developers to join the waitlist. No spam, we promise.