I want users to be able authenticate themselves against my Vapor-based API with their Google account. I’ve investigated using Imperial, and it handles the Google OAuth flow just great — but it insists on creating a cookie-based session. My Vapor project is an API-only project; it shouldn’t have sessions, and I shouldn’t use cookies. Instead, I want to send the authenticated client some kind of bearer token or something to use on subsequent API requests.
How should I go about creating a token as a result of a successful Google auth?
Is this perhaps what Imperial’s GoogleJWT is for…? I can’t find docs for it, and can’t even make sense of what config I’m supposed to pass it.
(P.S. I’d love to help contribute docs to the project for this if/when I get it figured out!)