-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat: Add support for signInMessage
method
#883
Open
kujtimprenkuSQA
wants to merge
44
commits into
dev
Choose a base branch
from
SQC-571/add-signin-message
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit will be dropped once the PR is ready to be merged, this only shows the potential flow for signInMessage until the work on this PR is done.
github-actions
bot
changed the title
Add support for
feat: Add support for Aug 16, 2023
signInMessage
methodsignInMessage
method
HarisSQA
previously approved these changes
Sep 13, 2023
kujtimprenkuSQA
requested review from
MaximusHaximus
and removed request for
MaximusHaximus
October 6, 2023 11:57
The only information we need to have in localStorage is the accountId and publicKey, having signature and other info from SignedMessage could be risky because dApps might use this info to authenticate users on their backend, dApps can subscribe to signedInMessage event to get all the info after signIn.
Added a new helper function and reused it in other packages to avoid duplication Improved persisting data for browser wallets, when no callbackUrl is provided fallback to location.href Rename interface keys in some places from signedInMessage to signedMessage Refactored signMessage for Welldone and MyNearWallet to avoid code duplication.
Merged
5 tasks
Resolving the conflicts introduced a bug in the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is about adding support for the
signInMessage
method into the wallet-selector API.This new method/function(way) will allow dApp users to "sign-in/login" into a dApp without a contractId (without adding LAK) by signing a message in the wallet based on the NEP413 standard for signing messages.
Once the message is signed and verified wallet selector will set the state as "signed-in"
Closes: #921
This PR includes
signInMessage
method in core package and exposed them.message
and thesignedInMessageAccount
into localStorage and rxjs store.signInType()
function to theselector
API.signInMessage
support for all wallets that currently supportsignMessage
.verifyMessageNEP413
to core helper functions.signInMessage
method to the API of the modal, so we can open the modal in a state to handlesignInMessage
e.gmodal.signInMessage(params)
signInMessage
Wallets that support
signInMessage
in this PRHow to use/trigger
signInMessage
in a dAppSetup Wallet Selector & Modal
Trigger
signInMessage
Subscribe/listen to events
Checklist:
Type of change.