Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conceptialize example 2 (app + Firebase) #6

Open
incorbador opened this issue Jun 18, 2023 · 0 comments
Open

Conceptialize example 2 (app + Firebase) #6

incorbador opened this issue Jun 18, 2023 · 0 comments
Assignees

Comments

@incorbador
Copy link
Contributor

Intro

To publish our plugin we must present its usage by including examples to it. Currently two main scenarios come to my mind that can be represented in an example each. The second one combines the app where the user signs in using passkeys with firebase (this serves data to the app). As Firebase is probably the default solution for small teams and individual programmers we should also show how to use passkeys with Firebase.

Description

Before we write the example we must think of how the app will communicate.
Then we can put a few ideas together what the example should include.

Implementation idea

  • register and login can be done the normal way (direct communication to Corbado Frontend API)
  • the login call returns a Corbado token
  • this token can be exchanged to a Firebase JWT token by calling a Firebase cloud function => this cloud function must validate the token (either by just looking at it or by calling Corbado's API) and must create the Firebase JWT token
  • the cloud function will be written and provided by us (Firebase has a concept of "extensions" for that and can be installed by users by a click
  • finally the app can call signInWithCustom token (using the Firebase JWT) => now all firebase services can be used just as normal
image
@incorbador incorbador self-assigned this Jun 18, 2023
@vincentdelitz vincentdelitz reopened this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants