/RustJWT

Primary LanguageRustApache License 2.0Apache-2.0

RustJWT Generator

  • Getting The Team ID
    1. Step 1 Open The Apple Developer Account Get the Team ID under Membership Details, Copy and paste it into the example.json

    2. Getting The Key Open The Apple Developer Account (Again) Navigate to Keys Click on the + to create a new Key (Name it whatever) image Choose whatever services you need and then Continue Copy and paste that AuthKey_XXXXXXXXXX.p8 into the src folder edit the main.rs to use your key

         let private_key = fs::read_to_string("AuthKey_XXXXXXXXXX.p8").expect("Failed to read private key");
    3. Editing the json file run this command inside the src folder

       cp example.json jwt.json

      afterwards open the jwt.json and copy and paste your Key ID into apns_key_id

      {
          "apns_key_id": ""
      }
    4. Completed! You should be able to run

      cargo run

      and the output should look like this

      Generated token:
      
Buy Me a Coffee at ko-fi.com