Generating a Development Token
- PowerSync Cloud
- Self-Hosted
- In the PowerSync Dashboard, select your project and instance
- Go to the Client Auth view
- Check the Development tokens setting and save your changes
- Click the Connect button in the top bar
- Enter a user ID:
- If your data isn’t filtered by user (same data syncs to all users), you can use any value (e.g.,
test-user).
- If your data isn’t filtered by user (same data syncs to all users), you can use any value (e.g.,
- If your data is filtered by , use a user ID that matches a user in your database. PowerSync uses this (e.g.
auth.user_id()in Sync Streams) to determine what to sync.
- Click Generate Token and copy the token
Development tokens expire after 12 hours.
Usage
Using with Your Application
While you build your app, use a development token to connect it to PowerSync. Update thefetchCredentials() function in your backend connector to return the generated token.