Skip to content

How to access user collection attributes from authUser uid #26

Open
@MincePie

Description

@MincePie

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions