Getting Started
Authorizing a User

Authorizing a User

We've now got expo fitbit intergrated in our project, so let's let users sign in with their fitbit account:

Retrieve promptAsync from useFitbitProvider

const {
    promptAsync
} = useFitbitProvider();

Add it to your button

<Button onPress={() => promptAsync()}>Log in with Fitbit</Button>

In some cases you may want to disable the button if there is a user currently logged in, you can do this by retrieving isLoggedIn from useFitbitProvider()