-
Notifications
You must be signed in to change notification settings - Fork 21
Customizing Token Expiration
Nikita Bulai edited this page Nov 24, 2016
·
2 revisions
By default, all Access Tokens expires in 2 hours (7200 seconds). You can change this in the configuration:
GrapeOAuth2.configure do |config|
config.access_token_lifetime = 7200 # in seconds
end
If you set the option to nil
the Access Token will never expire!
By default, Authorization Code expires in 30 minutes (1800 seconds). You can change this setting in the configuration:
GrapeOAuth2.configure do |config|
config.authorization_code_lifetime = 7200 # in seconds
end
Unlike authorization codes and access tokens, refresh tokens do not have a TTL expiration.