grape-oauth2 / grape_oauth2

Flexible, ORM-agnostic, fully customizable and simple OAuth2 provider for Grape API
41 stars 23 forks source link

Ensure access_tokens are destroyed when ActiveRecord::Client is destroyed #7

Closed graudeejs closed 7 years ago

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.674% when pulling 4bd68d11ece24c4cbcebb2a91bb83a7b082cb053 on graudeejs:destroy_tokens_when_client_is_destroyed into 5d41becc4b0711d21dcad85ab75189230a103fc6 on nbulaj:master.

nbulaj commented 7 years ago

Hi @graudeejs, thanx for contributing! Maybe we can replace destroy with delete_all in order to perform a single SQL query rather than loading each one and running callbacks? Moreover, it will be great to add the same functionality for all the mixins (Sequel & Mongoid)

graudeejs commented 7 years ago

delete_all would be fine for most cases. About Sequel and Mongoid: I'm not proficient in those.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.674% when pulling bab5b13fae546693dbb5022b2bca2027d835097b on graudeejs:destroy_tokens_when_client_is_destroyed into 5d41becc4b0711d21dcad85ab75189230a103fc6 on nbulaj:master.

nbulaj commented 7 years ago

Thanks!