You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide shows you how to build a sample app doing various things with "social login" using https://tools.ietf.org/html/rfc6749[OAuth2] and https://projects.spring.io/spring-boot/[Spring Boot].
16
-
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 (https://developers.facebook.com[Facebook] or https://developer.github.com/[Github]).
17
-
The samples are all single-page apps using Spring Boot and Spring OAuth on the back end.
18
-
They also all use plain https://jquery.org/[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.
15
+
This guide shows you how to build a sample app doing various things with "social login" using https://tools.ietf.org/html/rfc6749[OAuth 2.0] and https://projects.spring.io/spring-boot/[Spring Boot].
19
16
20
-
Because one of the samples is a full OAuth2 Authorization Server we have used the https://docs.spring.io/spring-security-oauth2-boot/docs/current/reference/htmlsingle/[shim JAR] which supports bridging from Spring Boot 2.0 to the old Spring Security OAuth2 library.
21
-
The simpler samples could also be implemented using the native OAuth2 support in https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-security-oauth2[Spring Boot] security features.
22
-
The configuration is very similar.
17
+
It starts with a simple, single-provider single-sign on, and works up to a client with a choice of authentication providers:
18
+
https://github.com/settings/developers[GitHub] or https://developers.google.com/identity/protocols/OpenIDConnect[Google].
19
+
20
+
The samples are all single-page apps using Spring Boot and Spring Security on the back end.
21
+
They also all use plain https://jquery.org/[jQuery] on the front end.
22
+
But, the changes needed to convert to a different JavaScript framework or to use server-side rendering would be minimal.
23
+
24
+
All samples are implemented using the native OAuth 2.0 support in https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-security-oauth2[Spring Boot].
We have seen how to use Spring Boot and Spring Security to build apps in a number of styles with very little effort.
37
-
The main theme running through all of the samples is "social" login using an external OAuth2 provider.
38
-
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.
37
+
The main theme running through all of the samples is authentication using an external OAuth 2.0 provider.
38
+
39
39
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.
40
-
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.
40
+
Remember if you use versions of the samples in your own servers to register with GitHub (or similar) and get client credentials for your own host addresses.
41
41
And remember not to put those credentials in source control!
0 commit comments