loginWithRedirectメソッドで、Actionsやユニバーサルログイン画面の@@config@@でパラメータを渡す – 【Auth0】

loginWithRedirectメソッドで、Actionsやユニバーサルログイン画面の@@config@@でパラメータを渡す – 【Auth0】

ライブラリ

ライブラリバージョン
@auth0/auth0-spa-js2.0.8

Actions(Login)

onExecutePostLoginの引数eventに渡すことができます。

  await auth0Client.loginWithRedirect({
    authorizationParams: {
      redirect_uri: window.location.origin,
      'key': 'value' // ★
    }
  });

event.request.queryのJSONオブジェクトにkey:valueが追加されます。

ユニバーサルログイン

ユニバーサルログインをカスタマイズします。

var config = JSON.parse(decodeURIComponent(escape(window.atob('@@config@@'))));

config.extraParamsのJSONオブジェクトにkey:valueが追加されます。

参考サイト

Auth0 Universal Login
DescribeshowAuth0UniversalLoginprovidesyouwiththemeanstoproveyourusers'identitieswithourauthorizationserver.
Structure of @@config@@
I’mtryingtohaveourHLPdisplayinglocallyinabrowsersothatIcaninteractivelyworkwiththelayoutandlogic.We’vegotalotofJSstuffedintothepage,butthatallfailsoncewehittheC...
Configuring @@config@@ for hosted login page
Iamstuckonhowtoactuallyprovidevaluestothe@@config@@object,whichisusedinthehostedloginpagegeneratedcode:Is@@config@@aplaceholder,andifsowhatistheobjectIshouldpro...
Documentation of “@@“ variables?
Incustomloginscriptsthereisavariable“@@config@@“available.InSAMLIDPconnectionsthereare“@@IssueInstant@@”and"@@ProtocolBinding@@“variables.Arethesedocumentedanyw...
Send custom params from auth0-spa-js loginWithRedirect() for using in rules
DearCommunity,I’mdevelopingreactJSappusingauth0-spa-js.IwanttopasscustomparamsthroughtheloginWithRedirect()functionandusesameinrulestoimplementsomecustomlogic.P...

コメント

タイトルとURLをコピーしました