O'Reilly logo

Lift Application Development Cookbook by Gilberto T. Garcia Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Signing up using a Twitter account

We will now learn how to log users in to your application using their Twitter account. Unlike Gmail, Facebook, and LinkedIn, Twitter does not have an OAuth2 API where you can make requests on behalf of the user. This means that we can only use OAuth2 to communicate with a small part of their API.

Unfortunately, the API part involved in the process of verifying user credentials is only accessible via Twitter's OAuth API, which uses Version 1 of the OAuth protocol. I said unfortunately because more work—code, requests, and more—is necessary when working with OAuth. However, there is a neat library we can use to work with OAuth that will make our lives easier.

Getting ready

  1. Start a new blank project.
  2. Edit the build.sbt ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required