Directory

← Back

OAuth Popup Add-on

OAuth Popup

Author

Rating

Popularity

<100

IMPORTANT: there's a fork of this addon by Bryson Dunn, with updated Scribe and other improvements:

https://vaadin.com/directory#!addon/oauth2-popup-add-on

^ Use that instead.

This add-on contains buttons that open an OAuth popup dialog where the user can authorize the Vaadin application to do things on the users' behalf on various services such as Facebook, Twitter, etc.

This add-on is similar to the OAuth Buttons add-on (http://vaadin.com/addon/oauth-buttons), except that this one:

  • requires Vaadin 7.1+
  • opens the OAuth dialog in a separate browser window, keeping the application window open
  • doesn't have helper user classes for login; this one simply returns an OAuth access token and it's up to the application to do something with it

IMPORTANT: since the OAuth dialog is opened in a separate window, the application should enable Server Push. https://vaadin.com/book/vaadin7/-/page/advanced.push.html Without server push the actual application UI will not be updated when the button sends the OAuth successful / denied callback. That's because the callback originates from a different browser window and the client of the application UI doesn't know that somethings's changed, unless Server Push is used.

More info at the Source Code link -->

Feedback is welcome.

Sample code

OAuthPopupButton ob = new TwitterButton(TW_KEY, TW_SECRET);

ob.addOAuthListener(new OAuthListener() {
  @Override
  public void authSuccessful(String accessToken, String accessTokenSecret) {
    Notification.show("Authorized");
    // TODO: do something with the access token
  }

  @Override
  public void authDenied(String reason) {
    Notification.show("Authorization denied");
  }
});

layout.addComponent(ob);

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

Released
2015-07-28
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.1+
Browser
N/A

OAuth Popup Add-on - Vaadin Add-on Directory

OAuth Popup OAuth Popup Add-on - Vaadin Add-on Directory
IMPORTANT: there's a fork of this addon by Bryson Dunn, with updated Scribe and other improvements: https://vaadin.com/directory#!addon/oauth2-popup-add-on ^ Use that instead. This add-on contains buttons that open an OAuth popup dialog where the user can authorize the Vaadin application to do things on the users' behalf on various services such as Facebook, Twitter, etc. This add-on is similar to the OAuth Buttons add-on (http://vaadin.com/addon/oauth-buttons), except that this one: * requires Vaadin 7.1+ * opens the OAuth dialog in a separate browser window, keeping the application window open * doesn't have helper user classes for login; this one simply returns an OAuth access token and it's up to the application to do something with it IMPORTANT: since the OAuth dialog is opened in a separate window, the application should enable Server Push. https://vaadin.com/book/vaadin7/-/page/advanced.push.html Without server push the actual application UI will not be updated when the button sends the OAuth successful / denied callback. That's because the callback originates from a different browser window and the client of the application UI doesn't know that somethings's changed, unless Server Push is used. More info at the Source Code link --> Feedback is welcome.
Online Demo
Issue Tracker
Source Code

OAuth Popup Add-on version 0.0.1
null

OAuth Popup Add-on version 0.0.2
Fixes + GitHubButton

OAuth Popup Add-on version 0.0.3
null

OAuth Popup Add-on version 0.0.4
null

Online