Skip to content

Spring boot template with facebook OAuth login (manual flow)

Notifications You must be signed in to change notification settings

svpuli/spring-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-auth

Spring boot template with facebook OAuth login (manual flow)

This project template implements a facebook login flow using based on

https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow

using OAuth and not the Facebook javascript API (login button).

There are 2 application config parameters necessary to run the app:

  • APP_ID: Your fb app id
  • APP_SECRET: Your fb app secret

Open https://localhost:8445/index.html to login to login

Stack:

  • Spring Boot
  • jQuery (just proof-of-concept)

Login flow simplified:

  1. Login using dialog
  2. Response from dialog contains code and state (csrf)
  3. GET access_token from client_secret,client_id and redirect_url
  4. GET app access_token from client_id and client_secret
  5. GET inspect access_token from access_token and app_id
  6. Verify inspect access_token against client_id and validity

CSRF verification is not added.

About

Spring boot template with facebook OAuth login (manual flow)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published