Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Added ability to generate login links for a user. #9054

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Conversation

barankyle
Copy link
Member

@barankyle barankyle commented Oct 13, 2023

Summary

In ProfileMenu, there's a new button to generate a login link for the current user. This should help when logging into multiple devices for multi-camera purposes.

🤖 Generated by Copilot at 5ea0f77

This pull request adds a feature to generate and copy a login link for a user account in the client-core package, using a new service and a new hook in the server-core package. It also simplifies an import and updates the translations in the user.json file. The affected files are ProfileMenu.tsx, AuthService.ts, login-token.class.ts, login-token.hooks.ts, and user.json.

References

closes #insert number here

Explanation

🤖 Generated by Copilot at 5ea0f77

  • Add login link feature for user accounts (link, link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Import config object and loginTokenPath constant to access server URL and login-token service (link, link)
  • Declare loginLink hookstate variable to store generated login link (link)
  • Define createLoginLink function to call AuthService.createLoginToken method and set loginLink variable (link)
  • Add text element to profile menu to trigger createLoginLink function (link)
  • Add input text element to profile menu to display and copy loginLink variable (link)
  • Add createLoginToken method to AuthService class to create login token using login-token service (link)
  • Add KnexAdapterParams type to login-token.class.ts and remove redundant import (link, link)
  • Add conditional and validation hooks to login-token.hooks.ts to check identity provider and set data fields for login token creation (link, link, link, link)

🤖 Generated by Copilot at 5ea0f77

Sing, O Muse, of the skillful coder who devised
A wondrous feature for the user interface, and added
New keys to the user.json file, like a cunning craftsman
Who shapes a fine vessel with his hands and tools.

QA Steps

List any additional steps required to QA the changes of this PR, as well as any supplemental images or videos.

Checklist

  • If this PR is still a WIP, convert to a draft
  • When this PR is ready, mark it as "Ready for review"
  • ensure all checks pass
  • Changes have been manually QA'd
  • Changes reviewed by at least 2 approved reviewers

In ProfileMenu, there's a new button to generate a login link for the current
user. This should help when logging into multiple devices for multi-camera
purposes.
@HexaField HexaField merged commit b59c228 into dev Oct 17, 2023
13 checks passed
@HexaField HexaField deleted the login-links branch October 17, 2023 22:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants