diff --git a/google/README.MD b/google/README.MD
new file mode 100644
index 0000000..e9cb080
--- /dev/null
+++ b/google/README.MD
@@ -0,0 +1,33 @@
+# Spring Boot + OAuth2 Google
+
+
+
+
+## Перед запуском
+### Создание OAuth
+Для запуска понадобиться обзавестить своим **Google OAuth**.
+
+1. Переходим в [Google APIs console credentials](https://console.cloud.google.com/apis/credentials?project=silent-fuze-322306)
+2. Создаём новый OAuth Client ID
+ 
+3. Заполняем обязательно следующие поля
+ - **Application type**: `Web application`
+ - **Homepage URL**: `http://127.0.0.1:8080`
+ - **Authorization callback URL**: `http://127.0.0.1:8080/login/oauth2/code/google`
+ 
+5. Получаем **Client secret/Client ID**
+ 
+
+### Настройка Spring
+Открываем файл `src/main/resources/application.yml` и указываем там **Client ID** и **Client secrets**:
+
+```yaml
+spring:
+ security:
+ oauth2:
+ client:
+ registration:
+ google:
+ client-id: 704750524716-tnqc2islqao8tobjbrgvtte0fq8o39uv.apps.googleusercontent.com
+ client-secret: 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
+```
diff --git a/google/build.gradle b/google/build.gradle
new file mode 100644
index 0000000..b7fec0f
--- /dev/null
+++ b/google/build.gradle
@@ -0,0 +1,22 @@
+plugins {
+ id 'org.springframework.boot' version '2.6.6'
+ id 'io.spring.dependency-management' version '1.0.11.RELEASE'
+ id 'java'
+}
+
+group = 'example.oauth2'
+version = '1.0-SNAPSHOT'
+sourceCompatibility = JavaVersion.VERSION_11
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation('org.springframework.boot:spring-boot-starter-web')
+ implementation('org.springframework.boot:spring-boot-starter-freemarker')
+
+ implementation('org.springframework.boot:spring-boot-starter-security')
+ implementation('org.springframework.security:spring-security-oauth2-client')
+ implementation('org.springframework.security:spring-security-oauth2-jose:5.6.3')
+}
diff --git a/google/docs/1.png b/google/docs/1.png
new file mode 100644
index 0000000..b23b7fa
Binary files /dev/null and b/google/docs/1.png differ
diff --git a/google/docs/2.png b/google/docs/2.png
new file mode 100644
index 0000000..824f074
Binary files /dev/null and b/google/docs/2.png differ
diff --git a/google/docs/3.png b/google/docs/3.png
new file mode 100644
index 0000000..c7cf2fe
Binary files /dev/null and b/google/docs/3.png differ
diff --git a/google/docs/google.svg b/google/docs/google.svg
new file mode 100644
index 0000000..c652a5a
--- /dev/null
+++ b/google/docs/google.svg
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/google/src/main/java/example/oauth2/google/ApplicationGoogle.java b/google/src/main/java/example/oauth2/google/ApplicationGoogle.java
new file mode 100644
index 0000000..cf63bb7
--- /dev/null
+++ b/google/src/main/java/example/oauth2/google/ApplicationGoogle.java
@@ -0,0 +1,13 @@
+package example.oauth2.google;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ApplicationGoogle {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ApplicationGoogle.class, args);
+ }
+
+}
diff --git a/google/src/main/java/example/oauth2/google/config/MvcConfig.java b/google/src/main/java/example/oauth2/google/config/MvcConfig.java
new file mode 100644
index 0000000..424b397
--- /dev/null
+++ b/google/src/main/java/example/oauth2/google/config/MvcConfig.java
@@ -0,0 +1,15 @@
+package example.oauth2.google.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class MvcConfig implements WebMvcConfigurer {
+
+ @Override
+ public void addViewControllers(ViewControllerRegistry registry) {
+ registry.addViewController("/").setViewName("index");
+ registry.addViewController("/secret").setViewName("secret");
+ }
+}
diff --git a/google/src/main/java/example/oauth2/google/config/WebSecurityConfig.java b/google/src/main/java/example/oauth2/google/config/WebSecurityConfig.java
new file mode 100644
index 0000000..3ffa17c
--- /dev/null
+++ b/google/src/main/java/example/oauth2/google/config/WebSecurityConfig.java
@@ -0,0 +1,24 @@
+package example.oauth2.google.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+
+@EnableWebSecurity
+@Configuration
+public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
+
+ @Override
+ protected void configure(HttpSecurity http) throws Exception {
+ //@formatter:off
+ http
+ .authorizeRequests()
+ .antMatchers("/").permitAll() //Доступ разрешен всем пользователей
+ .anyRequest().authenticated() //Все остальные страницы требуют аутентификации
+ .and()
+ .oauth2Login()
+ ;
+ //@formatter:on
+ }
+}
diff --git a/google/src/main/resources/application.yml b/google/src/main/resources/application.yml
new file mode 100644
index 0000000..3b182a8
--- /dev/null
+++ b/google/src/main/resources/application.yml
@@ -0,0 +1,17 @@
+server:
+ address: 127.0.0.1
+ port: 8080
+
+debug: false
+
+spring:
+ freemarker:
+ template-loader-path: classpath:/templates
+ suffix: .ftlh
+ security:
+ oauth2:
+ client:
+ registration:
+ google:
+ client-id: 704750524716-tnqc2islqao8tobjbrgvtte0fq8o39uv.apps.googleusercontent.com
+ client-secret: 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
diff --git a/google/src/main/resources/templates/includes/foother.ftlh b/google/src/main/resources/templates/includes/foother.ftlh
new file mode 100644
index 0000000..308b1d0
--- /dev/null
+++ b/google/src/main/resources/templates/includes/foother.ftlh
@@ -0,0 +1,2 @@
+