Skip to content
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

Add DeviceTrustWeb passthrough component #40608

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Add DeviceTrustWeb passthrough component #40608

merged 1 commit into from
Apr 22, 2024

Conversation

avatus
Copy link
Contributor

@avatus avatus commented Apr 17, 2024

figma link

This PR adds the "passthrough page" component for the device trust web authentication piece. This page will be what users see after logging into the web UI and a device trust token is returned in the response.

The final PR will be actually creating the route/feature that implements this component in e and passes it off to Connect but that will come together once this PR, #40438, and #40420 are in

Also, i snuck a prop update to our TopBar into this PR. the topbar will be displayed but with no components besides the logo so I added an optional prop to hide everything in the top bar but the Logo. that way, the logo functions the same way on this page as any other page (responsiveness and what not)

https://github.com/gravitational/teleport.e/issues/3236

Screenshot 2024-04-17 at 5 37 20 AM

@avatus avatus added the no-changelog Indicates that a PR does not require a changelog entry label Apr 17, 2024
@avatus avatus requested review from kimlisa and rudream April 17, 2024 04:49
@github-actions github-actions bot requested a review from ibeckermayer April 17, 2024 04:50
DownloadLink,
} from 'shared/components/DownloadConnect/DownloadConnect';

export const DeviceTrustConnectPassthrough = ({
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this component to the shared package because I will also be exporting the dialog that will be used in Connect to authorize in the final PR. I can be convinced otherwise

@avatus avatus requested review from ryanclark and removed request for ibeckermayer April 17, 2024 04:51
Comment on lines 96 to 103
<Box
css={`
text-align: center;
width: 100%;
position: absolute;
bottom: 24px;
`}
>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see people do this a lot - does const Whatever = styled(Box)``; not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does work, and I suppose it can be better. I've never been a fan of having what looks like a "component" but really its just wrapped css somewhere else in the file. I prefer seeing the css explicitly in the thing I'm designing. However, I can update if we wanna keep a standard

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm the opposite, I prefer styled components wrap other styled components instead of inline CSS in the JSX (otherwise we might as well use Tailwind)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might as well use Tailwind

Don't tease me with a good time.

I'll update to wrapped. I think devving with the inline works and once I'm happy with changes, moving to a wrapped is a good workflow for me 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrapped them all except link since it was a one-liner

web/packages/teleport/src/types.ts Show resolved Hide resolved
>
continue without device trust{' '}
</Link>
but you will not be able to connect to Teleport protected resources.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Teleport protected resources" seems to me like everything connected to Teleport

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Kenny wrote this, let me reach out to him and ask. Porbably something as simple as "you will not be able to connect to resources that require Device Trust"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

</Flex>
<Box>
<Text fontSize={3}>
Don't have Teleport Connect yet?{' '}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove the "yet"?

@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from rudream April 22, 2024 12:08
@avatus avatus force-pushed the avatus/passthrough branch from 5380177 to e159e84 Compare April 22, 2024 16:30
@avatus avatus added this pull request to the merge queue Apr 22, 2024
Merged via the queue into master with commit 4713707 Apr 22, 2024
39 checks passed
@avatus avatus deleted the avatus/passthrough branch April 22, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/md ui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants