Skip to content

onAuthTokenRequested() does not invoke before AuthToken Refresh Period or after AuthToken expires #741

@amit3vedi

Description

@amit3vedi

I have noticed that on 3.5.2 SDK version if app sets valid JWT token during initialisation. SDK use that JWT token but after that next time when token expires or about to expire as configured using setExpiringAuthTokenRefreshPeriod() method. SDK does not call onAuthTokenRequested() function again and app stops sending events to iterable.

To me it seems like this issue is happening because of this if condition here you have return statement inside if and because of this condition, value of pendingAuth variable will stay true and next time whenever app call requestNewAuthToken() function control will goto else block of if (!pendingAuth) { condition hence onAuthTokenRequested() will never get invoke until user restart app.

This is just my guess base on short time i spent checking SDK source code. issue could be something else but i have observed this issue on 3.5.2 multiple times. i had not observe this issue on 3.5.1 previously.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions