Skip to content

Commit

Permalink
waas: add deviceMetadata & redirectURL to ValidateSessionPacket
Browse files Browse the repository at this point in the history
  • Loading branch information
marino39 committed Nov 2, 2023
1 parent abd2961 commit 223e9bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/waas/src/payloads/packets/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export type SessionPacket = BasePacket & {
export type ValidateSessionPacket = BasePacket & {
code: 'validateSession',
session: string
deviceMetadata: string,
redirectURL: string,
}

export async function openSession({
Expand Down
6 changes: 4 additions & 2 deletions packages/waas/src/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,12 @@ export class Sequence {
return this.buildPayload(packet)
}

async validateSession(): Promise<Payload<ValidateSessionPacket>> {
async validateSession(deviceMetadata: string, redirectURL?: string): Promise<Payload<ValidateSessionPacket>> {
const packet = {
code: 'validateSession',
session: await this.getSignerAddress()
session: await this.getSignerAddress(),
deviceMetadata: deviceMetadata,
redirectURL: redirectURL,
} as ValidateSessionPacket

return this.buildPayload(packet)
Expand Down

0 comments on commit 223e9bc

Please sign in to comment.