24Slides / laravel-saml2

[Laravel 5.4+] An integration to add SSO to your service via SAML2 protocol based on OneLogin toolkit with support of multiple Identity Providers
MIT License
227 stars 67 forks source link

Is it possible to close the page after success? #73

Closed ioiofadhil closed 1 year ago

ioiofadhil commented 1 year ago

Hi, im using ReactJS v.18 for my FE and Laravel 10 for my BE. I'm passing success message to websocket in order for React to receive the success message. But I have no clue how to close the SAML page after it's success? All I see is redirecting to a link.

ioiofadhil commented 1 year ago

const [loginWindow, setLoginWindow] = useState(null)

// Open SAML page this way setLoginWindow(window.open(http://app.biota-ten.test/saml2/${res.data.data.uuid}/login, `,width=500,height=500`))

// Close after success loginWindow.close()