Skip to content

Commit

Permalink
Add expiresIn to CreatePasswordlessSessionOptions (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdeviant authored Jun 2, 2021
1 parent 5503fc4 commit b7946a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export interface CreatePasswordlessSessionOptions {
type: 'MagicLink';
email: string;
redirectURI?: string;
state?: string;
connection?: string;
type: 'MagicLink';
expiresIn?: number;
}
2 changes: 2 additions & 0 deletions src/passwordless/passwordless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ export class Passwordless {

async createSession({
redirectURI,
expiresIn,
...options
}: CreatePasswordlessSessionOptions): Promise<PasswordlessSession> {
const { data } = await this.workos.post('/passwordless/sessions', {
...options,
redirect_uri: redirectURI,
expires_in: expiresIn,
});
return data;
}
Expand Down

0 comments on commit b7946a9

Please sign in to comment.