Auth0 loginwithpopup in angular gets stuck on https://DOMAIN/authorize/resume?state=

Hello,

I’m facing the issue where when a user clicks on signup or login, the widget opens but if the widget is left open for more than 3-4mins and then user logs in or signs up the page goes blank.

When this happens on the signup page, our post user registration action does not get executed.

Can anyone help us resolve this issue? Thank you!

Regards,
Shrividya

Hi @sranjani ,

Welcome back to the Auth0 Community!

When the submission is delayed due to other work, the popup window could time out if the other work takes longer than 60 seconds, which is the popup window’s default timeout.

There is a timeout setting that can be configured. In the config options passed to the loginWithPopup() function, it is possible to pass an extended timeout for the popup window.

The specific property is “timeoutInSeconds” and can be found in this API reference documentation for the SDK.

Setting this value to something greater than 60 seconds, as per the use case, may alleviate the issue.


Please let me know if you have any further questions.

Thanks,
Timotei

Hello Petre,

Thank you for the response!

I get the following error when I try to use the timeoutinseconds property.

Object literal may only specify known properties, and ‘timeoutInSeconds’ does not exist in type ‘PopupLoginOptions’.ts

Is there any workaround for this?

Thank you!

Regards,
Shrividya

Hi @sranjani,

This usually happens when no parameter (options) are added to the loginWithPopup() function.

loginWithPopup(options?: PopupLoginOptions, config?: PopupConfigOptions)

To make it work, I recommend inserting a value or an empty one in the options parameter. Then, you can add the timeoutInSeconds: 60value to the config parameter, where you can change it to your needs.

An example can be that:

loginWithPopup() {
    this.auth.loginWithPopup({}, {
      timeoutInSeconds: 60
    });
  }

Please let me know if this works for you.

Thanks,
Timotei

Hello Petre,

Awesome, thank you for the response! Yes, this works for me. I was only passing the PopupConfigOptions which was causing the issue.

This resolves the issue. Thank you once again!

Regards,
Shrividya

1 Like

Hi @sranjani,

I’m glad this works for you.

Also, thank you for sharing it with the community.

If you have any additional questions, please contact the community.

Thanks,
Timotei

Sure, will do. Thank you!