diff --git a/CHANGELOG.md b/CHANGELOG.md index 32c2f4d1..810e9bfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [v2.0.1](https://github.com/auth0/auth0-react/tree/v2.0.1) (2023-02-22) +[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.0.0...v2.0.1) + +**Fixed** +- Support redirectUri again in a deprecated way [\#507](https://github.com/auth0/auth0-react/pull/507) ([frederikprijck](https://github.com/frederikprijck)) + ## [v2.0.0](https://github.com/auth0/auth0-react/tree/v2.0.0) (2023-01-19) Auth0-React v2 includes many significant changes compared to v1: diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css index 61f638bb..fe8e48ac 100644 --- a/docs/assets/highlight.css +++ b/docs/assets/highlight.css @@ -9,24 +9,26 @@ --dark-hl-3: #C586C0; --light-hl-4: #001080; --dark-hl-4: #9CDCFE; - --light-hl-5: #795E26; - --dark-hl-5: #DCDCAA; - --light-hl-6: #800000; - --dark-hl-6: #808080; - --light-hl-7: #267F99; - --dark-hl-7: #4EC9B0; - --light-hl-8: #E50000; - --dark-hl-8: #9CDCFE; - --light-hl-9: #0000FF; - --dark-hl-9: #569CD6; - --light-hl-10: #000000FF; - --dark-hl-10: #D4D4D4; - --light-hl-11: #0070C1; - --dark-hl-11: #4FC1FF; + --light-hl-5: #0000FF; + --dark-hl-5: #569CD6; + --light-hl-6: #0070C1; + --dark-hl-6: #4FC1FF; + --light-hl-7: #795E26; + --dark-hl-7: #DCDCAA; + --light-hl-8: #800000; + --dark-hl-8: #808080; + --light-hl-9: #267F99; + --dark-hl-9: #4EC9B0; + --light-hl-10: #E50000; + --dark-hl-10: #9CDCFE; + --light-hl-11: #000000FF; + --dark-hl-11: #D4D4D4; --light-hl-12: #800000; --dark-hl-12: #569CD6; --light-hl-13: #098658; --dark-hl-13: #B5CEA8; + --light-hl-14: #CD3131; + --dark-hl-14: #F44747; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @@ -46,6 +48,7 @@ --hl-11: var(--light-hl-11); --hl-12: var(--light-hl-12); --hl-13: var(--light-hl-13); + --hl-14: var(--light-hl-14); --code-background: var(--light-code-background); } } @@ -64,6 +67,7 @@ --hl-11: var(--dark-hl-11); --hl-12: var(--dark-hl-12); --hl-13: var(--dark-hl-13); + --hl-14: var(--dark-hl-14); --code-background: var(--dark-code-background); } } @@ -82,6 +86,7 @@ --hl-11: var(--light-hl-11); --hl-12: var(--light-hl-12); --hl-13: var(--light-hl-13); + --hl-14: var(--light-hl-14); --code-background: var(--light-code-background); } @@ -100,6 +105,7 @@ --hl-11: var(--dark-hl-11); --hl-12: var(--dark-hl-12); --hl-13: var(--dark-hl-13); + --hl-14: var(--dark-hl-14); --code-background: var(--dark-code-background); } @@ -117,4 +123,5 @@ .hl-11 { color: var(--hl-11); } .hl-12 { color: var(--hl-12); } .hl-13 { color: var(--hl-13); } +.hl-14 { color: var(--hl-14); } pre, code { background: var(--code-background); } diff --git a/docs/classes/OAuthError.html b/docs/classes/OAuthError.html index 50392885..19d2f305 100644 --- a/docs/classes/OAuthError.html +++ b/docs/classes/OAuthError.html @@ -27,7 +27,7 @@

Hierarchy

+
  • Defined in src/errors.tsx:7
  • @@ -68,19 +68,19 @@
    Optional error_description: Returns OAuthError
    +
  • Defined in src/errors.tsx:8
  • Properties

    error: string
    +
  • Defined in src/errors.tsx:8
  • error_description?: string
    +
  • Defined in src/errors.tsx:8
  • message: string
    +
  • Defined in src/auth0-provider.tsx:135
  • Returns Auth0ContextInterface<TUser>

    +
  • Defined in src/use-auth0.tsx:27
  • Returns ComponentType<Omit<P, "auth0">>

    +
  • Defined in src/with-auth0.tsx:29
  • Returns FC<P>

    +
  • Defined in src/with-authentication-required.tsx:82
  • Returns Promise<string | GetTokenSilentlyVerboseResponse>

    +
  • Defined in src/auth0-context.tsx:52
  • getAccessTokenWithPopup: ((options?: GetTokenWithPopupOptions, config?: PopupConfigOptions) => Promise<undefined | string>)
    @@ -153,7 +153,7 @@

    Type declaration

    Returns Promise<undefined | string>

    +
  • Defined in src/auth0-context.tsx:74
  • getIdTokenClaims: (() => Promise<undefined | IdToken>)
    @@ -181,13 +181,13 @@

    Type declaration

    • (): Promise<undefined | IdToken>
    • -
      const claims = await getIdTokenClaims();
      +
      const claims = await getIdTokenClaims();
       

      Returns all claims from the id_token if available.

      Returns Promise<undefined | IdToken>

    +
  • Defined in src/auth0-context.tsx:86
  • handleRedirectCallback: ((url?: string) => Promise<RedirectLoginResult<any>>)
    @@ -212,19 +212,19 @@
    Optional url: Returns Promise<RedirectLoginResult<any>>
    +
  • Defined in src/auth0-context.tsx:140
  • isAuthenticated: boolean
    +
  • Defined in src/auth-state.tsx:8
  • isLoading: boolean
    +
  • Defined in src/auth-state.tsx:9
  • loginWithPopup: ((options?: PopupLoginOptions, config?: PopupConfigOptions) => Promise<void>)
    @@ -235,7 +235,7 @@

    Type declaration

    Returns Promise<void>

    +
  • Defined in src/auth0-context.tsx:115
  • loginWithRedirect: ((options?: RedirectLoginOptions<AppState>) => Promise<void>)
    @@ -265,7 +265,7 @@

    Type declaration

    • (options?: RedirectLoginOptions<AppState>): Promise<void>
    • -
      await loginWithRedirect(options);
      +
      await loginWithRedirect(options);
       

      Performs a redirect to /authorize using the parameters provided as arguments. Random and secure state and nonce @@ -278,7 +278,7 @@

      Parameters

      Optional options: RedirectLoginOptions<AppState>

    Returns Promise<void>

    +
  • Defined in src/auth0-context.tsx:97
  • logout: ((options?: LogoutOptions) => void)
    @@ -289,7 +289,7 @@

    Type declaration

    • (options?: LogoutOptions): void
    • -
      auth0.logout({ returnTo: window.location.origin });
      +
      auth0.logout({ returnTo: window.location.origin });
       

      Clears the application session and performs a redirect to /v2/logout, using the parameters provided as arguments, to clear the Auth0 session. @@ -303,13 +303,13 @@

      Parameters

      Optional options: LogoutOptions

    Returns void

    +
  • Defined in src/auth0-context.tsx:130
  • user?: TUser
    +
  • Defined in src/auth-state.tsx:10
  • +
  • Defined in src/auth0-provider.tsx:86
  • cookieDomain?: string
    @@ -250,7 +250,7 @@
    Optional appState: Optional user: User

    Returns void

    +
  • Defined in src/auth0-provider.tsx:54
  • sessionCheckExpiryDays?: number
    @@ -266,11 +266,11 @@
    +
  • Defined in src/auth0-provider.tsx:68
  • useCookiesForTransactions?: boolean
    @@ -314,7 +314,7 @@

    Example

    let token: string;
    try {
    token = await auth0.getTokenSilently();
    } catch (e) {
    if (e.error === 'missing_refresh_token' || e.error === 'invalid_grant') {
    auth0.loginWithRedirect();
    }
    } +

    Example

    let token: string;
    try {
    token = await auth0.getTokenSilently();
    } catch (e) {
    if (e.error === 'missing_refresh_token' || e.error === 'invalid_grant') {
    auth0.loginWithRedirect();
    }
    }
    +
  • Defined in src/auth0-context.tsx:18
  • @@ -38,7 +38,7 @@

    Properties

    Properties

    -
    clientId?: string
    +
    clientId?: null | string

    The clientId of your application.

    If this property is not set, then the clientId that was used during initialization of the SDK is sent to the logout endpoint.

    If this property is set to null, then no client ID value is sent to the logout endpoint.

    @@ -85,7 +85,7 @@

    Example

    await auth0.logout({
    async openUrl(url) {
    window.location.replace(url);
    }
    }); +

    Example

    await auth0.logout({
    async openUrl(url) {
    window.location.replace(url);
    }
    });
    @@ -79,7 +79,7 @@

    Type declaration

  • Used to control the redirect and not rely on the SDK to do the actual redirect.

    -

    Example

    const client = new Auth0Client({
    async openUrl(url) {
    window.location.replace(url);
    }
    }); +

    Example

    const client = new Auth0Client({
    async openUrl(url) {
    window.location.replace(url);
    }
    });
    diff --git a/docs/interfaces/WithAuth0Props.html b/docs/interfaces/WithAuth0Props.html index 9c9e1366..34ae2cab 100644 --- a/docs/interfaces/WithAuth0Props.html +++ b/docs/interfaces/WithAuth0Props.html @@ -23,7 +23,7 @@

    Hierarchy

    • WithAuth0Props
  • +
  • Defined in src/with-auth0.tsx:7
  • @@ -39,7 +39,7 @@

    Properties

    +
  • Defined in src/with-auth0.tsx:8
  • +
  • Defined in src/with-authentication-required.tsx:22
  • @@ -46,17 +46,17 @@
    +
  • Defined in src/with-authentication-required.tsx:71
  • -
    withAuthenticationRequired(Profile, {
    loginOptions: {
    appState: {
    customProp: 'foo'
    }
    }
    }) +
    withAuthenticationRequired(Profile, {
    loginOptions: {
    appState: {
    customProp: 'foo'
    }
    }
    })

    Pass additional login options, like extra appState to the login page. This will be merged with the returnTo option used by the onRedirectCallback handler.

    +
  • Defined in src/with-authentication-required.tsx:65
  • onRedirecting?: (() => Element)
    @@ -67,25 +67,25 @@

    Type declaration

    • (): Element
    • -
      withAuthenticationRequired(Profile, {
      onRedirecting: () => <div>Redirecting you to the login...</div>
      }) +
      withAuthenticationRequired(Profile, {
      onRedirecting: () => <div>Redirecting you to the login...</div>
      })

      Render a message to show that the user is being redirected to the login.

      Returns Element

    +
  • Defined in src/with-authentication-required.tsx:50
  • returnTo?: string | (() => string)
    -
    withAuthenticationRequired(Profile, {
    returnTo: '/profile'
    }) +
    withAuthenticationRequired(Profile, {
    returnTo: '/profile'
    })

    or

    -
    withAuthenticationRequired(Profile, {
    returnTo: () => window.location.hash.substr(1)
    }) +
    withAuthenticationRequired(Profile, {
    returnTo: () => window.location.hash.substr(1)
    })

    Add a path for the onRedirectCallback handler to return the user to after login.

    +
  • Defined in src/with-authentication-required.tsx:40
  • +
  • Defined in src/auth0-provider.tsx:36
  • +
  • Defined in src/auth0-context.tsx:169