{"id":18569321,"url":"https://github.com/rayhanadev/replidentity-lib","last_synced_at":"2025-04-10T06:32:04.790Z","repository":{"id":59342917,"uuid":"536640139","full_name":"rayhanadev/replidentity-lib","owner":"rayhanadev","description":"Typescript/Node.js port of go-replidentity","archived":false,"fork":false,"pushed_at":"2022-09-14T21:55:49.000Z","size":107,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T17:01:42.007Z","etag":null,"topics":["authentication","replidentity","replit","replit-api"],"latest_commit_sha":null,"homepage":"https://replit.com/@RayhanADev/replidentity-lib","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rayhanadev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-14T15:19:33.000Z","updated_at":"2023-03-22T12:39:50.000Z","dependencies_parsed_at":"2022-09-18T07:35:50.817Z","dependency_job_id":null,"html_url":"https://github.com/rayhanadev/replidentity-lib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayhanadev%2Freplidentity-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayhanadev%2Freplidentity-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayhanadev%2Freplidentity-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rayhanadev%2Freplidentity-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rayhanadev","download_url":"https://codeload.github.com/rayhanadev/replidentity-lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248168292,"owners_count":21058810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","replidentity","replit","replit-api"],"created_at":"2024-11-06T22:33:44.865Z","updated_at":"2025-04-10T06:32:04.335Z","avatar_url":"https://github.com/rayhanadev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Repl Identity\n\n(for Typescript/Javascript!)\n\nFrom [go-replidentity](https://github.com/replit/go-replidentity)\n\n\u003e Repl Identity stores a REPL_IDENTITY token in every Repl automatically. This token is a signed PASETO that includes verifiable repl identity data (such as the user in the repl, and the repl ID).\n\u003e \n\u003e **WARNING: in their current form, these tokens are very forwardable! You should only send these tokens to repls that you trust, or between repls that you own.**\n\u003e \n\u003e This package provides the necessary code to verify these tokens.\n\u003e \n\u003e Check the example at tests/identity.test.js for an example usage. You can also see this in action at https://replit.com/@RayhanADev/replidentity-lib. If you are logged in to Replit, you'll see your username when you click \"Run\" on the Cover Page - that's Repl Identity at work.\n\n## Install\n\n```sh\n# with NPM\n$ npm install replidentity\n\n# with Yarn\n$ yarn add replidentity\n```\n\n## Usage\n\n```js\nimport * as replidentity from 'replidentity';\n\nasync function main() {\n\tlet audience = 'another-cool-repl-id';\n\tconst identityToken = await replidentity.CreateIdentityTokenAddressedTo(audience);\n\n\tconst parsedIdentity = await replidentity.VerifyIdentity(\n\t\tidentityToken,\n\t\taudience,\n\t\treplidentity.ReadPublicKeyFromEnv,\n\t);\n\n\tconsole.log(`The identity token (${identityToken.length} bytes) is:`);\n\tconsole.log(`\n  repl id:  ${parsedIdentity.replid}\n     user:  ${parsedIdentity.user}\n     slug:  ${parsedIdentity.slug}\n audience:  ${parsedIdentity.aud}\nephemeral:  ${parsedIdentity.ephemeral}\n   origin:  ${parsedIdentity.originReplid}`);\n}\n\nmain();\n```\n\nFor more information, visit [the blog post](https://blog.replit.com/repl-identity)!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayhanadev%2Freplidentity-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frayhanadev%2Freplidentity-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frayhanadev%2Freplidentity-lib/lists"}