Giter VIP home page Giter VIP logo

Example app for using the Google OAuth service with Vaadin and Spring Boot

This is an example project demonstrating how to configure and use the OAuth services provided by Google, i.e. how to enable 'Login with Google' functionality in Vaadin apps.

NOTE To run this example, you will need to apply for an API key from Google and add it to the application.properties file under src/main/resources. Please follow this tutorial for instructions on how to do that, and more information about how this example works. Depending on how/if you deploy your app a better option can be to pass API key & secret as an environment variable.

For local testing, you can add http://localhost:8080 to the URIs section and http://localhost:8080/login/oauth2/code/google to the Authorized URIs section in the Google API dashboard once you have created a key. You will still need an Authorized URL that is not localhost for the API Key to work; these are just for convenience.

Running the Application

Import the project to the IDE of your choosing as a Maven project.

Run the application using mvn spring-boot:run or by running the Application class directly from your IDE.

Open http://localhost:8080/ in your browser.

If you want to run the application locally in the production mode, run mvn spring-boot:run -Pproduction.

More Information

Shadi Khani's Projects

Shadi Khani doesnโ€™t have any public repositories yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.