1.0.3 • Published 2 years ago

firebase-sign-in-with-ethereum v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

firebase-sign-in-with-ethereum

Asynchronously signs in using an Ethereum address.

Use the ethereum address in your wallet (MetaMask) to sign the credentials used to sign in with the Firebase Auth SDK.

Note: This strategy use the signInWithEmailAndPassword method of the Firebase Auth SDK.

Install the package

Install the firebase-sign-in-with-ethereum npm module:

npm i firebase firebase-sign-in-with-ethereum

Use in you project

  1. Call the signInWithEthereum method and indicate the auth instance of the Firebase SDK.
import { signInWithEthereum } from "firebase-sign-in-with-ethereum";
import { getAuth } from "firebase/auth";

const auth = getAuth();

signInWithEthereum(auth)
  .then((userCredential) => {
    // Signed in 
    const user = userCredential.user;
    // ...
  })
  .catch((error) => {
    const errorCode = error.code;
    const errorMessage = error.message;
    // ..
  });
  1. The next step is to grant to the read address permission from your Ethereum wallet.

grant access

  1. The next step is sign the message with your Ethereum wallet.

Sign message

Changelog

Can be found in CHANGELOG

ansi-regexJSONStreamadd-streamansi-stylesbalanced-matcharray-ifybrace-expansionarrifybuffer-fromcliuicamelcase-keyscamelcasecolor-namecompare-funccolor-convertchalkconcat-mapconventional-changelog-angularconcat-streamconventional-changelogconventional-changelog-atomconventional-changelog-conventionalcommitsconventional-changelog-config-specconventional-changelog-codemirrorconventional-changelog-eslintconventional-changelog-emberconventional-changelog-jqueryconventional-changelog-coreconventional-changelog-expressconventional-changelog-preset-loaderconventional-changelog-jshintconventional-changelog-writerconventional-commits-filtercore-jsconventional-commits-parsercore-util-isconventional-recommended-bumpdateformatdecamelizedot-propdargsdetect-newlinedecamelize-keysdetect-indentdotgitignoreerror-exescaladeescape-string-regexpemoji-regexfaye-websocketfind-upfiguresfs-accessfirebasefunction-bindget-pkg-repoget-caller-filegit-raw-commitsfs.realpathgit-remote-origin-urlgit-semver-tagsglobgitconfiglocalgraceful-fshandlebarshosted-git-infohas-flaghasimmediateinflighthard-rejectionhttp-parser-jsidbis-core-moduleinheritsiniis-arrayishindent-stringis-fullwidth-code-pointis-plain-objjson-parse-even-better-errorsjson-parse-better-errorsis-objisarrayjs-tokensis-text-pathjsonparsejson-stringify-safekind-ofliejsziplines-and-columnslodash.camelcaseload-json-filelocate-pathlonglru-cachelodashlodash.ismatchmap-objmeowmin-indentminimatchneo-asyncminimist-optionsmodify-valuesminimistoncenull-checknode-fetchpakop-limitnormalize-package-dataparse-jsonp-tryp-locatepath-existspath-is-absolutepath-typepath-parsepifyprocess-nextick-argsprotobufjspromise-polyfillread-pkgquick-lrureadable-streamqrequire-directoryredentread-pkg-upresolvesafe-bufferselenium-webdriverrimrafsemversource-mapspdx-correctspdx-exceptionssplitset-immediate-shimspdx-license-idsspdx-expression-parsestringify-packagestring_decodersplit2string-widthstrip-ansistrip-bomstrip-indentsupports-colortr46supports-preserve-symlinks-flagtmptext-extensionsthroughtslibtrim-newlinesthrough2type-festtypedarrayuglify-jsvalidate-npm-package-licenseutil-deprecatewordwrapwhatwg-fetchwebsocket-driverwebidl-conversionswrap-ansiwhatwg-urlwrappywebsocket-extensionsyallistwsxtendy18nyargsyargs-parseryocto-queue
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago