Skip to content

Commit

Permalink
fix: add phone number from MCP in declarant form (#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturlg authored Jan 29, 2024
1 parent f3fda9f commit ee7d513
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function MonCompteProProvider<P extends MonCompteProProfile>(
allowDangerousEmailAccountLinking: true,
authorization: {
params: {
scope: "openid email profile organizations",
scope: "openid email profile organizations phone",
},
},
checks: ["pkce", "state"],
Expand All @@ -58,6 +58,7 @@ export function MonCompteProProvider<P extends MonCompteProProfile>(
id: profile.sub,
email: profile.email,
name: profile.given_name,
phone_number: profile.phone_number,
};
},
...options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const DeclarantForm = ({ session }: PropsWithChildren<Props>) => {
nom: formData[stepName]?.nom || user?.lastname,
prénom: formData[stepName]?.prénom || user?.firstname,
email: formData[stepName]?.email || user?.email,
téléphone: formData[stepName]?.téléphone || "",
téléphone: formData[stepName]?.téléphone || user?.phoneNumber,
accordRgpd: true,
},
});
Expand Down

0 comments on commit ee7d513

Please sign in to comment.