Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
Menu
Independent Facebook Login Authentication

Independent Facebook Login Authentication

Posted on April 12, 2021December 14, 2023 by Toma Velev

If you want to integrate the Facebook Login in your app, but you want at least some small part of the Authentication to be Independent – this article is for you.

The World Wide Web is a Communication Layer present on almost every meaningful device form factor. If some functionality works on it, it could reach all Platforms. If you have the skills – logging in is one such functionality and you could implement it only once on the web and minimize the dependencies and the size of the native applications. That is often a concern very later in a state of Service Development.

Custom App Authentication Node

You most probably have an app that has features, functionalities and services separated, independent from the Log In Module. Theoretically you could separate them. What I’ve implemented myself is – the main entry point to generate some random unique string and pass it to the Facebook Interacting Node.

Facebook Login & Register Node

Facebook gives code snippets to get started. I’m hosting the Hello World Example here. You could view source, replace the app_id and host it yourself. It just authenticates users and prints in the console of the browser the authentication details. Facebook restricts developers – for security reasons – from what host an app_id can integrate new applications.

My Idea is – Authenticating node to check if the string is authenticated and if not – to shows the login. Once a user is authenticated, you could pass back to the Custom App Node the pair – temp Facebook access token and the unique random string. I am hosting a very simple example showcasing the result:  https://programtom.com/dev_examples/independent_login/

JWT Node

Once you got some user verified in the Custom App, you could move to the Authorization phase. The Access Token From Facebook will expire and if you want your users to have access to your services after that, you could roll in your own Token <Refresh + Access> basing on the initial Authentication. This will make you independent from the 3rd party. The best practices currently are the JWT emitting Services such as connect2id and others (for example: https://auth0.com/).

  • Feature Flags – Enable Functionality from the BackEnd
  • Integrating xAI Grok API with Spring Boot
  • How to Progresively Integrate AI
  • What is an AI Agent
  • Flutter image scaling

Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (256)
  • Graphical User Interface (14)
  • Marketing (116)
  • Software Development (281)
  • Spring (44)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (14)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (84)
    • Flutter Apps (24)
    • GPT (4)
    • Java (38)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (35)
    • Utils (15)
    • Vaadin 24+ (27)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Feature Flags – Enable Functionality from the BackEnd
  • Integrating xAI Grok API with Spring Boot
  • How to Progresively Integrate AI
  • What is an AI Agent
  • Flutter image scaling

Post Categories

  • Apps (22)
  • ChatGPT (23)
  • Choosing a Framework (38)
  • Flutter (256)
  • Graphical User Interface (14)
  • Marketing (116)
  • Software Development (281)
  • Spring (44)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (14)