Skip to content

Commit

Permalink
functionality of ios google facebook
Browse files Browse the repository at this point in the history
  • Loading branch information
kh77 committed Mar 29, 2021
1 parent 98fc8c1 commit d591bcc
Show file tree
Hide file tree
Showing 35 changed files with 2,078 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore

# Node artifact files
node_modules/
dist/

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]

# Log files
*.log

# Package files
*.jar

# Maven
target/
dist/

# JetBrains IDE
.idea/
*.iml
logs/

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

/LOG_HOME_IS_UNDEFINED/app/
/social-login-by-token.iml
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Validate Social login token at back-end and get profile information

# Social Login (IOS, Google, Facebook)
- Create Web Project in developer console of social platform
- Using developer console and get the access token then hit the API


- Facebook PlayGround
- https://developers.facebook.com/tools/explorer/


- Google PlayGround
- https://developers.google.com/oauthplayground/
- Scope : openid email profile
- Exchange authorization code for token then you will get id_token


- Swagger
- http:https://localhost:8080/app/swagger-ui.html


- For Facebook
- Request body
- {
"provider": "facebook",
"token": " Get access token from Playground "
}


- For Google
- Request body
- {
"provider": "google",
"token": " Get id token from Playground "
}


- For Apple :
- We need authorization code to validate on it.
- We are passing the values of firstName and lastName because when we get authorization code that time user-info will be provided after that only email will be received. This is current behaviour in APPLE doc.
- Request body
- {
"firstName" : "Hello"
"lastName" : "World"
"provider" : "apple",
"token" : "Get authorization code. It will be used only one time to validate and get the user information"
}


- Important class and points
- SocialClient.java
- google and facebook api to get user info

- IOSConfig.java
- 4 properties we need from apple developer project

- IOSClient.java
- get apple user info

0 comments on commit d591bcc

Please sign in to comment.