@cemiar/auth-sdk 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ export declare class CemiarAuthClient implements CemiarAuthClientInstance {
15
15
  getAccessToken(): string | null;
16
16
  setAccessToken(token: string | null): void;
17
17
  private authPost;
18
- sendEmailCode(email: string): Promise<EmailCodeResponse>;
18
+ sendEmailCode(recipientEmail: string, senderEmail?: string): Promise<EmailCodeResponse>;
19
19
  verifyEmailCode(email: string, code: string): Promise<UserInfo | null>;
20
20
  handleRedirectMicrosoftCallback(routeQueryData: Record<string, string>): UserInfo | null;
21
21
  getMicrosoftLoginUrl(extraParams?: Record<string, string>): string;
@@ -48,8 +48,8 @@ export class CemiarAuthClient {
48
48
  });
49
49
  return response.data;
50
50
  }
51
- async sendEmailCode(email) {
52
- return this.authPost("/emailCodes/generate", { email });
51
+ async sendEmailCode(recipientEmail, senderEmail) {
52
+ return this.authPost("/emailCodes/generate", { recipientEmail, senderEmail });
53
53
  }
54
54
  async verifyEmailCode(email, code) {
55
55
  const payload = {
@@ -79,7 +79,7 @@ export interface CemiarAuthClientInstance {
79
79
  setAccessToken(token: string | null): void;
80
80
  getMicrosoftLoginUrl(params?: Record<string, string>): string;
81
81
  handleRedirectMicrosoftCallback(routeQueryData: Record<string, string>): UserInfo | null;
82
- sendEmailCode(email: string): Promise<EmailCodeResponse>;
82
+ sendEmailCode(recipientEmail: string, senderEmail?: string): Promise<EmailCodeResponse>;
83
83
  verifyEmailCode(email: string, code: string): Promise<UserInfo | null>;
84
84
  refreshToken(): Promise<AuthTokens>;
85
85
  logout(options?: LogoutOptions): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cemiar/auth-sdk",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "Cemiar Auth integration helpers for web apps and APIs.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",