Google accounts authentication in a Vaadin app running in GAE

Hi,

I wrote a simple demonstration how to do Google accounts authentication in a
Vaadin application running in the Google App Engine
.

In Application.init() we do nothing except add a TransactionListener that will initialize the UI if needed and check the authentication status using the GAE-provided API. We defer the UI initialization to the request listener because the required HTTPServletRequest object is not yet available at Application.init().


Sources


Demo

Hopefully someone finds this useful.

Hi,
is there an updated code, e.g. for Vaadin 7?
since almost all the methods seem to be outdated… and as a newbie on Vaadin this is the only clean example I could actually find.

e.g. how do i get the request URI from the VaadinRequest context, to give it to Google UserService.createLoginURL() ?
the GAE example code from https://vaadin.com/book/vaadin7/-/page/intro.walkthrough.html is:

public class HelloWorld extends UI {
@Override
protected void init(VaadinRequest request) {

thanks a lot in advance.

Hi,

I don’t know if it’s the correct way but this line works for me in vaadin 7.

userService.createLoginURL(Page.getCurrent().toString());

I would like to see an updated tutorial about this subject.

Thanks in advance