Skip to content

auth(native): OAuth with react-native-firebase #260

Open
@jsbranco

Description

@jsbranco

Do you want to request a feature or report a bug?
Potential Bug

What is the current behavior?
Cannot use react-native-firebase with this project

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.

When trying to call this.props.firebase.login({}) from react-native-firebase, it triggers an exception in line 20 of auth.js:
const provider = new firebase.auth[${capitalize(providerName)}AuthProvider]()

screen shot 2017-08-30 at 22 30 51

The reason being that in react-native-firebase, the firebase.auth.FacebookAuthProvider is not a class, it is an object with credential attribute as seen here:
https://github.com/invertase/react-native-firebase/blob/ceedf9b85aed2f66954a3ccdcdf7e23e8715ee0e/lib/modules/auth/providers/Facebook.js

Has anyone encountered this issue?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions