Skip to content

Commit

Permalink
Fix some typos, missing spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniyelMe committed Jun 24, 2020
1 parent c65d55c commit 5e4fa34
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

A performance focused alternative to the official firebase auth library that is designed to work with my other alternatives for [storage](https://github.com/samuelgozi/firebase-storage-lite) and [firestore](https://github.com/samuelgozi/firebase-firestore-lite).

The goal of this library is to provide a performance focused alternative to the official SDKs. This comes with some costs. The big one is browser support, we only support modern browsers, but you can always rin them through Babel.
The goal of this library is to provide a performance focused alternative to the official SDKs. This comes with some costs. The big one is browser support, we only support modern browsers, but you can always run them through Babel.

[My Alternative SDK performs in average 13 times better and is 27 times smaller than the official ones](https://github.com/samuelgozi/firebase-firestore-lite/wiki/Firebase-Alternative-SDK-Benchmarks).

## What else do I need to consider?

The API is completely different. This is not a drop in replacement, instead our API is much simpler and easier to use.
The API is completely different. This is not a drop-in replacement, instead our API is much simpler and easier to use.
In addition you should consider the next points:

1. This is still work in progress and the API will change without warning until version 1.0.
2. There is a small difference working with Federated Identity Providers.
3. Sessions can only be persisted in localStorage(More options will be added).
3. Sessions can only be persisted in localStorage (More options will be added).
4. The code is written with modern JS and you are responsible for tranpiling it for your targets, but babelrc configuration is ready. The code also makes use of the Fetch API and local storage.
5. Not fully tested yet(I don't have a good testing strategy yet...)

## Features and roadmap

- [x] Authenticate with Email and password.
- [x] Authenticate with Federated Identity Provider.
- [x] Authenticate with link to email(no password required).
- [x] Authenticate with link to email (no password required).
- [x] Authenticate with a custom token.
- [x] Authenticate anonymously.
- [ ] Authenticate with phone.
Expand All @@ -46,9 +46,9 @@ You might be curious as to why I'm auoiding using firebases endpoint, well, the

1. It is more secure. The reason you need to whitelist in the first place is for security.
2. It is way faster, in some cases up to 5 seconds faster.
3. I don't trust firebase(or anyone) with my user's private data, and you shouldn't either.
3. I don't trust firebase (or anyone) with my user's private data, and you shouldn't either.

Yes I know that the third one sounds exaggerated, especially when we rely on them anyways. But their endpoint works on the client(It's JS) and you shouldn't trust the client.
Yes, I know that the third one sounds exaggerated, especially when we rely on them anyways. But their endpoint works on the client (It's JS) and you shouldn't trust the client.

## How to install

Expand Down Expand Up @@ -107,7 +107,7 @@ If the data is correct and matches an existing user, the user will be signed in.

### Authenticate with Federated Identity Provider.

When signing in with an IdP, the user will be redirected to their page, and later redirected back into our app. Because of this, wee need to tell the provider where to redirect to by using the `redirectUri` property. It needs to be a page that will finish the sign in flow by running a method(read below how).
When signing in with an IdP, the user will be redirected to their page, and later redirected back into our app. Because of this, we need to tell the provider where to redirect to by using the `redirectUri` property. It needs to be a page that will finish the sign in flow by running a method (read below how).

Please make sure the provider is correctly set up in the Firebase console.

Expand Down Expand Up @@ -138,7 +138,7 @@ In that URL we need to finish the auth flow. We do that very easily by running a
auth.handleSignInRedirect();
```

Thats it. After this the user should be signed in.
That's it. After this the user should be signed in.

### Authenticate anonymously.

Expand Down Expand Up @@ -167,7 +167,7 @@ const removeListener = auth.listen(user => {
removeListener(); // The callback will no longer be called on updates.
```

Now every time the user state or data is changed, the callback will be called with tne new data.
Now every time the user state or data is changed, the callback will be called with the new data.
The `listen()` method returns a function that can be called when we wish to stop listening for updates.

# Full API Reference
Expand Down

0 comments on commit 5e4fa34

Please sign in to comment.