Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class TokenProvider
def self.generate(email)
uri = URI("https://example.com/#{email}")
response = Net::HTTP.get_response(uri)
if response.code == '200'
return JSON.parse(response.body)[:token]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.