Skip to content

feat(auth): add custom claims #741

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

Closed
wants to merge 13 commits into from

Conversation

joerex
Copy link

@joerex joerex commented Aug 3, 2019

Description

Firebase has a secure way of identifying and making claims about users with custom claims. This is a good way to provide roles for users.

This PR offers an optional configuration to fetch custom claims with the profile and updates the docs to describe how to do it.

Check List

If not relevant to pull request, check off as complete

  • [ x ] All tests passing
  • [ x ] Docs updated with any changes or examples if applicable
  • [ x ] Added tests to ensure new feature(s) work properly

Relevant Issues

@0x80
Copy link
Contributor

0x80 commented Aug 5, 2019

@joerex It looks like you forgot to (re)base your commits on the next branch. There are loads of commits included that aren't yours and 163 changed files in total.

@prescottprue
Copy link
Owner

@joerex your changes look great, nice work! If we point it to master or rebase/start from next, then we can get it merged in

@prescottprue prescottprue changed the title Add custom claims feat(auth): add custom claims Aug 10, 2019
prescottprue pushed a commit that referenced this pull request Aug 11, 2019
Manual cherry-pick of commit by @joerex - 7f8f693
@prescottprue prescottprue mentioned this pull request Aug 11, 2019
3 tasks
@prescottprue
Copy link
Owner

prescottprue commented Aug 11, 2019

Used cherry-pick to get this commit by @joerex to get this into v3.0.0-alpha.15.

prescottprue added a commit that referenced this pull request Aug 11, 2019
* feat(hooks): hook rework to match existing HOC - #734 - @illuminist
* fix(hooks): remove create functions (`createUseFirestore`, `createWithFirestore`, `createUseFirebase`, `createWithFirebase`) since store selection is not necessary
* feat(auth): add custom claims - #741 - @joerex 
* fix(types): changed extended firebase instance to function - #743 - @rscotten
* fix(types): switch `typeof Firebase` to `any` (prevents issue with passing some version of Firebase JS SDK)
* fix(examples): update material  and typescript examples
prescottprue pushed a commit that referenced this pull request Aug 11, 2019
* feat(auth): add custom claims - #741 - @joerex
* feat(deps): update hoist-non-react-statics to 3.3.0
@prescottprue
Copy link
Owner

Also added to a PR for v2.4.0 so it can go into latest. Thanks again @joerex

@prescottprue prescottprue mentioned this pull request Aug 11, 2019
3 tasks
prescottprue added a commit that referenced this pull request Aug 15, 2019
* feat(auth): add custom claims - #741 - @joerex
* feat(deps): update `hoist-non-react-statics` to 3.3.0
* feat(auth): expose `linkAndRetrieveDataWithCredential`, `linkWithPopup`, and `linkWithRedirect` - #473
* feat(docs): update auth docs with Expo react-native example - #539
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants