GithubHelp home page GithubHelp logo

hhy5277 / tut-spring-boot-oauth2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spring-guides/tut-spring-boot-oauth2

0.0 1.0 0.0 194 KB

Spring Boot and OAuth2:: A tutorial on "social" login and single sign on with Facebook and Github

Home Page: https://spring.io/guides/tutorials/spring-boot-oauth2/

Ruby 0.71% Java 73.34% HTML 25.95%

tut-spring-boot-oauth2's Introduction

tags projects
security
javascript
rest
oauth
spring-security
spring-security-oauth
spring-boot

Social Login with Spring Boot and OAuth2

Table of Contents

This guide shows you how to build a sample app doing various things with "social login" using OAuth2 and Spring Boot. It starts with a simple, single-provider single-sign on, and works up to a self-hosted OAuth2 Authorization Server with a choice of authentication providers (Facebook or Github). The samples are all single-page apps using Spring Boot and Spring OAuth on the back end. They also all use plain jQuery on the front end, but the changes needed to convert to a different JavaScript framework or to use server side rendering would be minimal.

Because one of the samples is a full OAuth2 Authorization Server we have used the shim JAR which supports bridging from Spring Boot 2.0 to the old Spring Security OAuth2 library. The simpler samples could also be implemented using the native OAuth2 support in Spring Boot security features. The configuration is very similar.

Conclusion

We have seen how to use Spring Boot and Spring Security to build apps in a number of styles with very little effort. The main theme running through all of the samples is "social" login using an external OAuth2 provider. The final sample could even be used to provide such a service "internally" because it has the same basic features that the external providers have. All of the sample apps can be easily extended and re-configured for more specific use cases, usually with nothing more than a configuration file change. Remember if you use versions of the samples in your own servers to register with Facebook or Github (or similar) and get client credentials for your own host addresses. And remember not to put those credentials in source control!

tut-spring-boot-oauth2's People

Contributors

aha-oretama avatar alanjeeves avatar augusto avatar dertobsch avatar gredwhite avatar gregturn avatar h4ckninja avatar jbotuck avatar jrodbx avatar oscar-21 avatar snicoll avatar spring-operator avatar tstavinoha avatar waded avatar zombiyamo avatar

Watchers

 avatar

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.