New Features
Login by Facebook
In this contribution I focused about possibility to login to this application by facebook account.
To this moment my API part has only one possibility to authorization. User has to create new account in this application. I decided with my friend who is making a android application connected with my server part, that we have to implement a facebook login to our application, what is more in the future we want to more integrated our application with facebook, such like posting to own table, sharing etc. All information ofc will be stored in our database including login time, address ip and other information, which make our application more safety.
screenshot from swagger with this method:
Implementation
Implementation is divided into several parts. This feature required some changes in code and adding new services, resources and other method.
- screen with commits and pull request from github
As you can see in commits implementation contains:
- add new resources like: resources for login and user data from facebook.
- add facebook service
- add necessary methods in accountControler and services
- add unit test for account service
How it works?
When want to login by Facebook in mobile application, send login request to Facebook. Then he receive facebook access token, this token is sending to our application with login request. We are checking if this user exsist in Facebook data and we send request to get a basic data like email, firstname and surname which are required in our application. Next step is checking if this user exist in our database, if exsist the system will create JWT Tokens and return to user. If user not exist system will create account in our application and return tokens. In next request user have to use tokens from our application to get other resources.
Links:
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
When will the integration with the mobile app happen? I'd like to try the features of this app.
You can contact us on Discord.
[utopian-moderator]
Hey @eastmael, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
thanks, my friend who is responsible for mobile app is now very busy, but I started developing a web application witch will also use this API.
Hey @piach I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x