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: add polaris-web client library #87

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

HunnySajid
Copy link
Collaborator

@HunnySajid HunnySajid commented Feb 5, 2024

@rodolfomiranda I replaced the App.tsx (the code used to communicate with extension) code with a separate package.
https://www.npmjs.com/package/polaris-web
Please test before merging into the main.

import {
  requestAid, // call to select aid for signing in
  requestCredential, // call to select credential for signing in
  requestAidORCred, // call to select either aid of credential
  attemptAutoSignin, // call for auto signin
} from "polaris-web";

Usage attemptAutoSignin

const handleAutoSignin = async () => {
    try {
      const resp = await attemptAutoSignin();
      if (resp?.data) {
        alert(
          "Signed headers received\n" +
            JSON.stringify(resp?.data.headers, null, 2)
        );
      }
    } catch (error) {}
  };

@rodolfomiranda
Copy link
Collaborator

Where is the code for the polaris-web package?

@HunnySajid
Copy link
Collaborator Author

@rodolfomiranda rodolfomiranda merged commit a98e8e9 into WebOfTrust:main Feb 7, 2024
@HunnySajid HunnySajid deleted the feat/polaris-web-client branch February 9, 2024 16:06
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.

2 participants