-
Notifications
You must be signed in to change notification settings - Fork 181
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
Multi-tenancy support #271
base: master
Are you sure you want to change the base?
Conversation
@@ -35,7 +36,7 @@ | |||
"tslint-config-prettier": "^1.18.0", | |||
"typescript": "4.5.5" | |||
}, | |||
"homepage": "https://github.com/benwinding/react-admin-firebase", | |||
"homepage": "https://github.com/rinfimate/react-admin-firebase", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
none of the changes in this file besides the dependency should be part of the pull request
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might need to make another branch on your fork say rinfimate:add-multi-tenant-support
in order to only merge in changes that are necessary (you then can update this PR with the new branch)... otherwise you'll need to change your master
branch to remove these changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @rinfimate just need some more details and to cleanup package.json
before merging
@@ -35,7 +36,7 @@ | |||
"tslint-config-prettier": "^1.18.0", | |||
"typescript": "4.5.5" | |||
}, | |||
"homepage": "https://github.com/benwinding/react-admin-firebase", | |||
"homepage": "https://github.com/rinfimate/react-admin-firebase", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might need to make another branch on your fork say rinfimate:add-multi-tenant-support
in order to only merge in changes that are necessary (you then can update this PR with the new branch)... otherwise you'll need to change your master
branch to remove these changes
public async HandleGetTenant() { | ||
try { | ||
const user = await this.getUserLogin(); | ||
// @ts-ignore | ||
const token = await user.getIdTokenResult(); | ||
const decodedToken:any = jwt_decode(token.token); | ||
return decodedToken["firebase"]["tenant"]; | ||
} catch (e) { | ||
log('HandleGetTenant: no user is logged in or tokenResult error', { | ||
e, | ||
}); | ||
return null; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add to the README
on how this works? 🙏
No description provided.