Wiki source code of Preserve User Profiles When Cloning to a Different Identity Provider
Last modified by Eleni Cojocariu-testing account on 2026/08/21 15:47
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | When the target instance of a clone authenticates against a different identity provider than the source, or against the same provider with a different client configuration, the [[external identities>>documentation.xs.admin.authentication.user-profiles-external-identities.WebHome]] recorded on the copied [[user profiles>>documentation.xs.user.user.WebHome]] match nothing. To keep returning users on the profile they already have: | ||
| 2 | |||
| 3 | 1. Export the user profiles of the target instance that are linked to an external identity, before cloning it: one at a time with [[Export a Page>>documentation.xs.user.exports.export-page.WebHome]], or together with [[Export Content in XAR format>>documentation.xs.admin.exports.export-content-xar-format.WebHome]]. | ||
| 4 | 1. Clone the instance by following [[Clone an XWiki Instance>>documentation.xs.admin.backup.instance-cloning.clone-instance.WebHome]], which keeps the target instance's own [[authentication>>documentation.xs.admin.authentication.WebHome]] settings rather than the source's. | ||
| 5 | 1. Reconnect the copied profiles to the target instance's identity provider, in one of two ways:((( | ||
| 6 | * [[Import>>documentation.xs.admin.imports.import-xwiki-pages.WebHome]] the profile pages exported in step 1, which restores the identity data the target instance had recorded. | ||
| 7 | * Edit that [[identity data>>documentation.xs.admin.authentication.user-profiles-external-identities.WebHome]] in the database instead. | ||
| 8 | ))) | ||
| 9 | 1. Log in on the target instance as a user the identity provider authenticates, and check that they reach the profile they already had, with no second profile created for them in the [[user index>>documentation.xs.user.user.view-wiki-users.WebHome]]. |