lib/rodauth/features/oauth.rb in rodauth-oauth-0.4.1 vs lib/rodauth/features/oauth.rb in rodauth-oauth-0.4.2

- old
+ new

@@ -541,9 +541,14 @@ authorization_required unless scopes.any? { |scope| token_scopes.include?(scope) } end def post_configure super + + # all of the extensions below involve DB changes. Resource server mode doesn't use + # database functions for OAuth though. + return unless is_authorization_server? + self.class.__send__(:include, Rodauth::OAuth::ExtendDatabase(db)) # Check whether we can reutilize db entries for the same account / application pair one_oauth_token_per_account = begin db.indexes(oauth_tokens_table).values.any? do |definition|