Authenticates using a launcher refresh token. This authentication method is useful when you have a valid refresh token from a previous authentication session.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xmistt/rebootpy/llms.txt
Use this file to discover all available pages before exploring further.
Class Signature
Parameters
A valid launcher refresh token.
The main Fortnite token to use with authentication. You should generally not need to set this manually.
Properties
The Authorization header for use with Fortnite endpoints. Use this if you’re making HTTP requests that aren’t already implemented.
Returns the refresh token.
Methods
eula_check_needed
False (refresh token auth doesn’t require EULA check)
ios_authenticate
The request priority.
authenticate
The request priority.
- Updates iOS token data
- Kills other sessions (if
client.kill_other_sessionsisTrue) - Obtains and updates chat, EAS, and EOS tokens
- Sets up the client user
Example Usage
Basic usage
Loading from environment variables
Loading from a file
How to Obtain a Refresh Token
Refresh tokens are automatically obtained when you authenticate with other methods. You can access the refresh token after successful authentication:Token Expiration
Refresh tokens typically expire after a certain period (usually 2 hours by default). The library automatically handles token refreshing during normal operation. However, if the refresh token expires, you’ll need to re-authenticate using another method.When to Use RefreshTokenAuth
UseRefreshTokenAuth when:
- You have a valid refresh token from a previous session
- You want to avoid re-authenticating with user interaction
- You’re implementing a session restoration feature
RefreshTokenAuth for:
- Initial authentication (use
DeviceCodeAuth,AuthorizationCodeAuth, orAdvancedAuthinstead) - Long-term credentials storage (use
DeviceAuthinstead)
Comparison with Other Auth Methods
| Method | Use Case | Persistence |
|---|---|---|
RefreshTokenAuth | Short-term session restoration | 2 hours (typical) |
DeviceAuth | Long-term automated authentication | Until password reset |
AuthorizationCodeAuth | Initial user authentication | Single use |
DeviceCodeAuth | User-friendly interactive login | Single use |
Error Handling
If the refresh token is invalid or expired, the authentication will fail. The library will raise anHTTPException with message code:
Security Considerations
Best practices:
- Use environment variables in production
- Encrypt tokens when storing in files
- Rotate tokens regularly
- Use DeviceAuth for long-term storage instead