{"id":19666809,"url":"https://github.com/herrmannplatz/mapkit-token","last_synced_at":"2025-04-28T22:32:00.478Z","repository":{"id":32563954,"uuid":"137125987","full_name":"herrmannplatz/mapkit-token","owner":"herrmannplatz","description":"🗺 Easily generate MapKit authorization tokens","archived":false,"fork":false,"pushed_at":"2023-12-20T20:05:16.000Z","size":471,"stargazers_count":12,"open_issues_count":7,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T11:34:22.547Z","etag":null,"topics":["apple","jwt","mapkit","mapkit-js"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/mapkit-token","language":"JavaScript","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/herrmannplatz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-12T20:47:16.000Z","updated_at":"2024-10-10T11:08:21.000Z","dependencies_parsed_at":"2023-12-20T21:26:03.935Z","dependency_job_id":"aa53c362-bada-40c9-9ea7-916363313c5d","html_url":"https://github.com/herrmannplatz/mapkit-token","commit_stats":{"total_commits":16,"total_committers":3,"mean_commits":5.333333333333333,"dds":0.3125,"last_synced_commit":"de7e3d8920886f24d688fd493f666b0ea04e9306"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herrmannplatz%2Fmapkit-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herrmannplatz%2Fmapkit-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herrmannplatz%2Fmapkit-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herrmannplatz%2Fmapkit-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herrmannplatz","download_url":"https://codeload.github.com/herrmannplatz/mapkit-token/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251397680,"owners_count":21583055,"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":["apple","jwt","mapkit","mapkit-js"],"created_at":"2024-11-11T16:29:05.493Z","updated_at":"2025-04-28T22:31:55.449Z","avatar_url":"https://github.com/herrmannplatz.png","language":"JavaScript","readme":"# mapkit-token\n\n[![npm version](https://badge.fury.io/js/mapkit-token.svg)](https://badge.fury.io/js/mapkit-token)\n\n\u003e 🗺 Easily generate [MapKit JS](https://developer.apple.com/documentation/mapkitjs) authorization tokens.\n\n## Install\n```\n$ npm install mapkit-token\n```\n\n## Usage\n```javascript\nconst generate = require('mapkit-token')\n\nconst key = fs.readFileSync('AuthKey_B1B1B1B1B1.p8')\nconst token = generate(key, 'B1B1B1B1B1', 'A1A1A1A1A1')\n```\n\nThis generates an authorization token (valid for 30 minutes) which can be used to authorize against the mapkit JS API. Check the [documentation](https://developer.apple.com/documentation/mapkitjs/setting_up_mapkit_js) on how to generate a key.\n\n### `generate(authKey, keyId, teamId[, ttl, origin])`\n\n* **authKey**: MapKit Authorization Key\n* **keyId**: MapKit JS Key ID.\n* **teamId**: Apple Developer Team ID.\n* **ttl**: Time to live in seconds. Defaults to 30 minutes.\n* **origin**: Domain restrictions. Optional but recommended.\n\nReturns the authorizaton token.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherrmannplatz%2Fmapkit-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherrmannplatz%2Fmapkit-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherrmannplatz%2Fmapkit-token/lists"}