Skip to content

Commit

Permalink
✨ [open-formulieren/open-forms#4320] Only display cosign login option…
Browse files Browse the repository at this point in the history
…s if links in emails are not allowed

The link in emails are proper deep-links that bring the user
directly to the required start page.
  • Loading branch information
sergei-maertens committed Nov 1, 2024
1 parent 5dac593 commit 8a521b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/FormStart/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ const FormStart = ({form, submission, onFormStart, onDestroySession, initialData
/>
) : (
<LoginOptions
form={form}
// if cosign allows links in emails, we don't need to display the cosign
// login options, so strip them out
form={form.cosignHasLinkInEmail ? {...form, cosignLoginOptions: []} : form}
onFormStart={onFormStart}
extraParams={{initial_data_reference: initialDataReference}}
/>
Expand Down
1 change: 1 addition & 0 deletions src/types/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const Form = PropTypes.shape({
loginRequired: PropTypes.bool.isRequired,
loginOptions: PropTypes.arrayOf(LoginOption).isRequired,
cosignLoginOptions: PropTypes.arrayOf(LoginOption),
cosignHasLinkInEmail: PropTypes.bool,
product: PropTypes.string,
slug: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,
Expand Down

0 comments on commit 8a521b1

Please sign in to comment.