Skip to content

Commit

Permalink
Remove buildAuthorizeUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikprijck committed Sep 12, 2022
1 parent ae09eed commit 6a20fda
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 97 deletions.
66 changes: 0 additions & 66 deletions __tests__/Auth0Client/buildAuthorizeUrl.test.ts

This file was deleted.

26 changes: 2 additions & 24 deletions src/Auth0Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ import {
User,
IdToken,
GetTokenSilentlyVerboseResponse,
TokenEndpointResponse,
BuildAuthorizeUrlOptions
TokenEndpointResponse
} from './global';

// @ts-ignore
Expand Down Expand Up @@ -354,28 +353,7 @@ export class Auth0Client {
}
}

/**
* ```js
* await auth0.buildAuthorizeUrl(options);
* ```
*
* Builds an `/authorize` URL for loginWithRedirect using the parameters
* provided as arguments. Random and secure `state` and `nonce`
* parameters will be auto-generated.
*
* @param options
*/
public async buildAuthorizeUrl(
options: BuildAuthorizeUrlOptions = {}
): Promise<string> {
const { url } = await this._prepareAuthorizeUrl(options);

return url;
}

private async _prepareAuthorizeUrl(
options: BuildAuthorizeUrlOptions
): Promise<{
private async _prepareAuthorizeUrl(options: RedirectLoginOptions): Promise<{
scope: string;
audience: string;
redirect_uri: string;
Expand Down
7 changes: 0 additions & 7 deletions src/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,6 @@ export interface RedirectLoginOptions<TAppState = any>
onRedirect?: (url: string) => Promise<void>;
}

export interface BuildAuthorizeUrlOptions extends BaseLoginOptions {
/**
* Used to add to the URL fragment before redirecting
*/
fragment?: string;
}

export interface RedirectLoginResult<TAppState = any> {
/**
* State stored when the redirect request was made
Expand Down

0 comments on commit 6a20fda

Please sign in to comment.