Directory

← Back

OAuth Buttons

Log in with Facebook / Twitter / LinkedIn with the click of a button.

Author

Rating

Popularity

<100

A set of buttons that makes it super-simple to allow users to log in with a service that provides OAuth, i.e "Log in with Facebook", "Log in with Twitter" etc.

Just add the desired button - once the user has logged in with the service, a callback will be called with user information.

This is an initial release to gauge interest and validate the API - please feel free to provide feedback.

Currently supported services are: Facebook, Twitter, LinkedIn. New services will be added, and it's also very straightforward to add support for more services (the Scribe OAuth library that's used supports a fair number).

The idea is to provide login, but you should be able to access the services API using the OAuth tokens and direct access to the Scribe API - feel free to comment on this if you need it.

NOTE that you need to register your application and obtain an API key for each service. The exact process varies between services - a blog post detailing some is upcoming.

Sample code

// this will be called upon successful authentication
            OAuthListener oauthListener = new OAuthListener() {
                public void userAuthenticated(User user) {
                    OAuthWindow.this.setContent(new LoggedInView(user));
                }

                public void failed(String reason) {
                    OAuthWindow.this.showNotification("Login failed", reason,
                            Notification.TYPE_ERROR_MESSAGE);
                }
            };

            // LinkedIn
            addComponent(new LinkedinButton("LINKEDIN_API_KEY", "LINKEDIN_API_SECRET",
                    oauthListener));

            // Facebook; you could ask for email w/ this
            addComponent(new FacebookButton("FACEBOOK_API_KEY",
                    "FACEBOOK_API_SECRET", oauthListener));

            // Twitter
            addComponent(new TwitterButton("TWITTER_API_KEY",
                    "TWITTER_API_SECRET", oauthListener));

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Initial release

Released
2012-04-26
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 6.0+
Browser
Browser Independent

OAuth Buttons - Vaadin Add-on Directory

Log in with Facebook / Twitter / LinkedIn with the click of a button. OAuth Buttons - Vaadin Add-on Directory
A set of buttons that makes it super-simple to allow users to log in with a service that provides OAuth, i.e "Log in with Facebook", "Log in with Twitter" etc. Just add the desired button - once the user has logged in with the service, a callback will be called with user information. This is an initial release to gauge interest and validate the API - please feel free to provide feedback. Currently supported services are: Facebook, Twitter, LinkedIn. New services will be added, and it's also very straightforward to add support for more services (the Scribe OAuth library that's used supports a fair number). The idea is to provide login, but you should be able to access the services API using the OAuth tokens and direct access to the Scribe API - feel free to comment on this if you need it. NOTE that you need to register your application and obtain an API key for each service. The exact process varies between services - a blog post detailing some is upcoming.
Online