Avoid redundant OAuth queries when not signed in

If you aren't signed in, you don't have an auth token.
When you don't have an auth token, React was sending the headers

"Authorization: Bearer null"

This caused 5 Doorkeeper token lookups using
WHERE "oauth_access_tokens"."token" = 'null'
on the Explore page (the root of the app when not signed in).
This commit is contained in:
Free Speech Forever
2021-02-15 23:26:00 +00:00
parent 7bfe6c7709
commit 92c9092abd
13 changed files with 82 additions and 77 deletions

View File

@@ -30,7 +30,9 @@ gem 'charlock_holmes', '~> 0.7.6'
gem 'iso-639'
gem 'chewy', '~> 5.0'
gem 'cld3', '~> 3.2.4'
gem 'devise', '~> 4.6'
git 'https://github.com/freespeech4ever/devise.git', branch: 'gab2' do
gem 'devise'
end
gem 'devise-two-factor', '~> 3.0'
group :pam_authentication, optional: true do