rubyforgood / inkind-admin

A project serving Community Education Partnerships - https://www.cep.ngo/ . This Rails application presents an admin interface for CEP to manage their volunteers and students. And provides a GraphQL backend for https://github.com/rubyforgood/inkind-volunteer .
MIT License
9 stars 27 forks source link

Let users only be logged in admin portal to use GraphQL endpoint #43

Closed garettarrowood closed 3 years ago

garettarrowood commented 3 years ago

BEFORE:

While logged into admin portal and using GraphiQL, it was as if you were not logged in. This was because the GraphqlController would only authenticate against the bearer_token (using headers).

AFTER:

Screen Shot 2021-10-09 at 1 12 56 PM

If no bearer_token is found, then fallback to Devise's current_user implementation.