Stripe - CreateLoginLink Redirect Option (#39979)

* CreateLoginLink - Redirect Option

* CreateLoginLink - Redirect Option
This commit is contained in:
Asitha de Silva
2019-10-30 11:22:01 -07:00
committed by Jesse Trinity
parent 9617fb31f2
commit a04f0db950
2 changed files with 9 additions and 2 deletions

View File

@@ -803,6 +803,13 @@ declare namespace Stripe {
url: string;
}
interface ILoginLinkOptions {
/**
* Where to redirect the user after they log out of their dashboard.
*/
redirect_url: string;
}
interface ICompanyShared {
/**
* The companys primary address.
@@ -9763,7 +9770,7 @@ declare namespace Stripe {
createLoginLink(accId: string, response?: IResponseFn<accounts.ILoginLink>): Promise<accounts.ILoginLink>;
createLoginLink(
accId: string,
redirectUrl?: string,
options?: accounts.ILoginLinkOptions,
response?: IResponseFn<accounts.ILoginLink>,
): Promise<accounts.ILoginLink>;

View File

@@ -1302,7 +1302,7 @@ stripe.accounts.createLoginLink('acct_17wV8KBoqMA9o2xk').then(loginLink => {
const created: number = loginLink.created;
const url: string = loginLink.url;
});
stripe.accounts.createLoginLink('acct_17wV8KBoqMA9o2xk', 'http://localhost:3000').then(loginLink => {
stripe.accounts.createLoginLink('acct_17wV8KBoqMA9o2xk', { redirect_url: 'http://localhost:3000' }).then(loginLink => {
const object: string = loginLink.object;
const created: number = loginLink.created;
const url: string = loginLink.url;