Git Product home page Git Product logo

custom-auth-samples's Introduction

Samples: Sign In Firebase with additional auth providers using Custom auth tokens

This repo contains samples that demonstrate how to use Custom auth tokens to Sign In Firebase with Identity Providers other than the ones with build-in support (Google, Facebook, Twitter and GitHub). We currently have the following samples:

You can find additional examples for Web in another repository.

Status

Status: Archived

This sample is no longer actively maintained and is left here for reference only.

Contributing

We'd love that you contribute to the project. Before doing so please read our Contributor guide.

License

ยฉ Google, 2016. Licensed under an Apache-2 license.

custom-auth-samples's People

Contributors

blomcheol avatar changjoo-park avatar coderspinoza avatar dependabot[bot] avatar iliasbhal avatar jayenashar avatar khanhlvg avatar morganchen12 avatar nicolasgarnier avatar rmehlinger avatar samtstern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

custom-auth-samples's Issues

[Feature Request] Yahoo! JAPAN Login

In Japan, there are many Yahoo! JAPAN users.
So I request to add Yahoo! JAPAN Login.
I would greatly appreicate if you can give my proposal a good review.

Invalid argument passed to createFireBaseAccount from Mobile App endpoint

Looks like in app.js line 142, we are passing the argument firebaseToken to the createFirebaseAccount function. This variable hasn't been created.

createFirebaseAccount(results.user.id, results.user.full_name,
        results.user.profile_picture, firebaseToken).then(firebaseToken => {
      // Send the custom token, access token and profile data as a JSON object.
      res.send(firebaseToken);

Think this should be a variable containing the access_token returned from the token endpoint for instagram.

Likely missing a

const accessToken = results.access_token;

createFirebaseAccount(results.user.id, results.user.full_name,
        results.user.profile_picture, accessToken).then(firebaseToken => {
      // Send the custom token, access token and profile data as a JSON object.
      res.send(firebaseToken);

Token Revocation

Are there any standard implementations for revoking the Firebase token if the user no longer has access in the 3rd party authentication provider which was used to create the custom token?

We use an internal OAuth provider for authentication and would like to use Firebase along with it. However, I can't find any documentation on standard practice for revoking the Firebase token if the OAuth provider revokes access to the user. It looks like the client can indefinitely keep refreshing the Firebase token once they authenticate with the 3rd party provider just once.

Linking custom OAuth providers with existing Firebase user

For officially supported OAuth providers such as Google, Facebook, Twitter, and Github, it is possible to link them to an existing Firebase user using FirebaseUser.linkWithCredential() method. However, it does not seem easy for custom OAuth providers to be linked with existing Firebase user since only signInWithCustomToken() method is supported for custom OAuth providers, not linkWithCredential(). Under this circumstance, I have two questions.

  1. Is there a way for unofficial providers to link accounts by creating credentials using OAuthProvider.getCredential() method? Currently when I try to create an AuthCredential object, I get this exception in Android.
com.google.firebase.FirebaseException: An internal error has occurred. [ INVALID_PROVIDER_ID:Provider Id is not supported. ]
  1. If 1) is not possible, what would be the suggested way of linking custom OAuth provider with the given Firebase user, say a user with facebook and google already linked?

For example, I would want a user to link all google, facebook, and instagram accounts since the service I am working on wants to post a given picture to all platforms. If this is not possible, developers would be reluctant to solely depend on Firebase authentication platform for managing users. I would appreciate any help or guide :)

Android example for Instagram

It would be great if we can have a example build for an Android app so that the best practices are followed in implementing other OAuth providers.
Thanks.

Please update to LINE OAuth v2

Hey, this is wonderful stuff and really helpful! But it's using a deprecated API, which makes it less helpful. ๐Ÿ˜ข

Any chance this can be updated to LINE OAuth v2?

Thanks a lot!!!!!

Switch to using firebase-admin

We should switch the server side samples to use the new firebase-admin module and do the account creation and profile update on the server side.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.