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

Give a button to External website for the SSO #135

Closed
3 tasks done
Rebal67 opened this issue Feb 9, 2023 · 7 comments
Closed
3 tasks done

Give a button to External website for the SSO #135

Rebal67 opened this issue Feb 9, 2023 · 7 comments
Assignees

Comments

@Rebal67
Copy link
Contributor

Rebal67 commented Feb 9, 2023

Description:
the external website has a way to add A Tonomy ID login button.
We need to build close to the same functionality of google login button

Reference: https://developers.google.com/identity/sign-in/web/sign-in

DOD:

  • Developer gets away to auto import a button with Tonomy Style.
  • When the button is clicked the login with tonomy Function is called (onPressLogin)
  • Demo app is updated to use the new button of the Login

this is implemented in the demo app
Reference: https://github.com/Tonomy-Foundation/Tonomy-ID-Demo-market.com/blob/development/src/pages/Home.tsx

@theblockstalk
Copy link
Contributor

could use this, but probably not necessary https://unpkg.com/

@HaseebUllahAbbasi HaseebUllahAbbasi self-assigned this Feb 27, 2023
@theblockstalk
Copy link
Contributor

@HaseebUllahAbbasi
Copy link
Contributor

  • Styling and basic event is attached with button

  • Some thing Like Google Does,

  • file should be min

  • file should contains the import from the userApps, js KeyManager,

  • the “tsc” directly does not work if import is used in ts file t

  • the tsdx configuration does’t work for this problem,it generates the

  • the roll up for changing one file
    rollup src/services/externalLogin.ts --file bundle.js --format iife

  • Found the way to bundle in one js file but why to put the whole sdk in file, when we need just one part

  • don’t know how to convert just one specific service

    • @theblockstalk suggestions
    • find out the way to work with tsdx
    • use below as an example
# To create a new App for SSO
# Call

npx ts-node --project cli.tsconfig.json --transpileOnly id.ts appName username description logoUrl domain publicKey blockchainUrl

@HaseebUllahAbbasi HaseebUllahAbbasi removed their assignment Mar 15, 2023
@theblockstalk
Copy link
Contributor

this seems like the most straightforward approach
https://discord.com/channels/1029385699071381524/1039498885598552065/1085514335478087691

@theblockstalk theblockstalk self-assigned this Apr 2, 2023
@theblockstalk
Copy link
Contributor

theblockstalk commented Apr 2, 2023

@Rebal67 from discord

the sdk can also be consumed by clients using script because it is bundled what you really want is 2 entry files and 2 output modules

  "exports": {
    ".": {
      "import": "./dist/es/index.js",
      "require": "./dist/cjs/index.js"
    },
    "./module2": {
      "import": "./dist/es/module2.js",
      "require": "./dist/cjs/module2.js"
    }
  },
  "typesVersions": {
    "": {
      "": [
        "dist/types/index.d.ts"
      ],
      "module2": [
        "dist/types/module2.d.ts"
      ]
    }
  }

this is an example in the package.json

@theblockstalk
Copy link
Contributor

looks like this is not well supported in tsdx still. See jaredpalmer/tsdx#175

@theblockstalk
Copy link
Contributor

theblockstalk commented Apr 2, 2023

going to try remove dependancy on tsdx. Will need to check the following still works:

  • build
  • watch (for npm start)
  • unit tests
  • integration tests
  • id.ts scripts
  • bootstrap scripts
  • linting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants