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

feat: Return Social User information #21

Merged
merged 5 commits into from
Jan 22, 2025

Conversation

tfrg
Copy link
Contributor

@tfrg tfrg commented Jan 21, 2025

What type of PR is this?

  • feature

What this PR does:

  • We've extended existing functionality to return full profile information for users who have socially signed in via Web3Auth.
  • Change storage mechanism from localStorage to sessionStorage

Copy link
Member

@jinoosss jinoosss left a comment

Choose a reason for hiding this comment

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

Check out some of the comments.

@@ -124,6 +124,7 @@ export class GnoSocialWalletProvider extends GnoWalletProvider {
const openloginAdapter = new OpenloginAdapter({
privateKeyProvider: privateKeyProvider,
adapterSettings: {
storageKey: 'session',
Copy link
Member

Choose a reason for hiding this comment

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

It looks good to get the settings from the user.

@@ -243,4 +246,12 @@ export class GnoSocialWalletProvider extends GnoWalletProvider {
web3auth.configureAdapter(openloginAdapter);
return new GnoSocialWalletProvider(web3auth, socialType, [networkConfig]);
}

public async getSocialUserProfile(): Promise<Partial<UserInfo>> {
Copy link
Member

Choose a reason for hiding this comment

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

A few more things

  1. override the UserInfo type.

  2. add a function to the TM2Wallet interface.

  3. make it possible to call the same function from adena-sdk.

  • We need some guard logic to check if it is an instance of GnoSocialWallet.

@dongwon8247 dongwon8247 merged commit 98195ec into onbloc:main Jan 22, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

3 participants