Skip to content

Specify token manually after horizon is connected #812

@arthurvi

Description

@arthurvi

I work with react native and horizon-react. We use Auth0 as oauth provider. Login happens in a WebView and with some magic I intercept the token from the redirect URL. This token is saved to AsyncStorage and all goes well.
But when I intercept the token, I want to let horizon use the new token. The client is already connected with Horizon. I know I can supply my own token and on reboot this works well:

const horizon = new Horizon({
    authType: {
        token: newToken,
        storeLocally: false
    }
});

But is it possible to manually tell horizon to use the new token we intercepted?

Server version: 2
Client version: 2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions