forked from jsnbuchanan/crowd-funder-for-time-pwa
feat: Add easier way for test users to register themselves.
This commit is contained in:
@@ -1348,12 +1348,12 @@ export async function createEndorserJwtVcFromClaim(
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a JWT for a RegisterAction claim.
|
||||
* Create a JWT for a RegisterAction claim, used for registrations & invites.
|
||||
*
|
||||
* @param activeDid - The DID of the user creating the invite
|
||||
* @param contact - The contact to register, with a 'did' field (all optional for invites)
|
||||
* @param identifier - The identifier for the invite, usually random
|
||||
* @param expiresIn - The number of seconds until the invite expires
|
||||
* @param contact - Optional - The contact to register, with a 'did' field (all optional for invites)
|
||||
* @param identifier - Optional - The identifier for the invite, usually random
|
||||
* @param expiresIn - Optional - The number of seconds until the invite expires
|
||||
* @returns The JWT for the RegisterAction claim
|
||||
*/
|
||||
export async function createInviteJwt(
|
||||
@@ -1367,7 +1367,7 @@ export async function createInviteJwt(
|
||||
"@type": "RegisterAction",
|
||||
agent: { identifier: activeDid },
|
||||
object: SERVICE_ID,
|
||||
identifier: identifier,
|
||||
identifier: identifier, // not sent if undefined
|
||||
};
|
||||
if (contact?.did) {
|
||||
vcClaim.participant = { identifier: contact.did };
|
||||
|
||||
Reference in New Issue
Block a user