Closed kdawgwilk closed 7 years ago
Looks like a test related to Facebook access token is failing but I didn't touch anything related to Facebook so not sure what it needs
Yep! The FB test will fail since Travis won't use encrypted data (the facebook api keys) for tests for PRs, since it's an attack vector to get the encrypted data.
Thanks for submitting this! I'll look into it and get it merged =]
I will try to get around to writing some tests but I am slammed right now so it might be a week or so
No worries! I've been moving to a new place this week so pretty busy as well. We'll get this merged, don't worry!
Hey @kdawgwilk, I made some modifications to your PR to clean up a few things -- you can see the comments along each commit. I haven't personally tested this with Digits yet, so need to do that -- but what do you think of the general direction?
All the changes look good to me but I still don't understand how I can authenticate a Digits account with an access token or API keys? I guess that comes down to how the session works. I can login with digits perfectly but I can't get auth to work on subsequent calls using either an AccessToken
or APIKey
. What format do those need to be sent in the request so that Turnstile picks them up and calls the right authenticate(credentials: Credentials)
in my User
model?
Gotcha. If you're using Vapor, it should automatically persist your session into a session cookie.
The vapor session manager resolves your session into a user ID, which it passes back to Turnstile as an Identifier
.
If you were to do an API Key or AccessToken, you'd basically do the same thing but handle the "exchange" of the Digits authentication data to your own API Key / access token yourself.
Alright this is ready to get merged if you are okay with it 👍
Awesome! I know I made some good sized changes to your code, so glad everything is working!
Would like to get some documentation written before tagging a release. @kdawgwilk would you like to modify the README to accommodate?
Yeah will do! I will try and get that done tonight
Awesome, thanks! I'll put you as a contributor so you can make a branch directly on here.
Finally got some time to add support for Digits. I still don't understand completely how Turnstile works so I am sure there are things I could fix in here and I would happily do so. Everything seemed to be working pretty well on my end except for AccessTokens but I think that has something to do with the way I set things up in my Vapor app. The API I am building using Turnstile for Authentication is an open source project I worked on for school and a hackathon posted here