On the DS-2 Death Star II Mobile Battle Station in Emperor Palpatine's throne room he stored his wayfinder. When Rey approached the throne of her grandfather, but felt a dark presence beckoning her from an adjacent chamber which housed the Emperor's wayfinder. Rey walked through the door as it closed behind her. Exploring the vault, she discovered the Sith wayfinder.
The dark side vision of Rey activated its saberstaff.
Once she grabbed it, she encountered a dark side vision of herself that haunted the ruins of the Death Star and represented her possible future. The dark vision told her not to be afraid of who she was, echoing the words of her master. The vision activated its hinged double-bladed lightsaber, that reeked of ozone, and they engaged in a duel. She was no match for her inner darkness, and she tumbled out the vault and dropped the wayfinder. Ren was there, and caught it in his hands.
Like the Cave of Evil on Dagobah and the ruins of the DS-2 Death Star II Mobile Battle Station Chamber adjacent in the throne room on the planet Kef Bir both project their worst fears as apparitions and illusions.