Skip to content

How to access user collection attributes from authUser uid #26

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

Open
MincePie opened this issue Jan 10, 2020 · 0 comments
Open

How to access user collection attributes from authUser uid #26

MincePie opened this issue Jan 10, 2020 · 0 comments

Comments

@MincePie
Copy link

I am really stuck in trying to figure out how to use the AuthUserContext to get to the attributes stored in the user collection for the user with the uid from the authUser.

I can do:

[import React from 'react';
import { compose } from 'recompose';
import { Divider, Layout, Card, Tabs, Typography } from 'antd';
import { AuthUserContext, withAuthorization, withEmailVerification } from '../Session/Index';

const Dashboard = () => (

<AuthUserContext.Consumer>
{authUser => (

<div>
{authUser.email}
   </div>
)}

</AuthUserContext.Consumer>
);

const condition = authUser => !!authUser;
export default compose(
withEmailVerification,
withAuthorization(condition),
)(Dashboard);
](url)

What I want to do is get from authUser to the user collection attributes such as: title so that i can somehow display the user information for the currently authorised user.

Has anyone figured out how to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant