auth0 / react-native-auth0

React Native toolkit for Auth0 API
https://auth0.com
MIT License
498 stars 210 forks source link

Networking client `timeout` not working on the 3.0.1 #792

Open fragilehm opened 1 year ago

fragilehm commented 1 year ago

Checklist

Description

After upgrading the package from 2.13.0 to 3.0.1 the timeout option to abort the request is not working anymore.

Reproduction

  1. Create an auth0 instance and pass 100 (ms) for timeout:
    auth0 = new Auth0({
      domain:DOMAIN,
      clientId: CLIENT_ID,
      timeout: 100,
    });
  2. Login by calling webAuth.authorize
    
    try {
    await auth0.webAuth.authorize({
          scope: SCOPE,
          audience: AUDIENCE,
          additionalParameters: {
            prompt: "login",
          },
    });
    catch (error) {
    // should throw `Timeout` error
    }

Additional context

No response

react-native-auth0 version

3.0.1

React Native version

0.67.4

Expo version

No response

Platform

iOS

Platform version(s)

15.6.1

poovamraj commented 1 year ago

@fragilehm thanks for raising this. Yes this needs to fixed on our end. We will work on this soon and update this thread as we make progress.

brth31 commented 1 week ago

@fragilehm just wanted to check if you are still facing this issue in the latest version of the SDK- v4.0.0-beta.0.