概要
LINEログイン機能を実装している中で下記のようにリダイレクトURIを指定します。
javascript
1 const redirect_uri = `https://sample.com/Stage/line_lazy?customerdata=${customer_id}-${order_id}` 2 const line_link = `https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=${client_id}&state=${line_state}&scope=profile%20openid&bot_prompt=normal&redirect_uri=${redirect_uri}`;
上述のredirect_uriにpage_type=thankyouとパラメーターを付与したいと思います。
javascript
1 const redirect_uri = `https://sample.com/Stage/line_lazy?page_type=thankyou%26customerdata=${customer_id}-${order_id}`
&を追加すると上手く行かないので%26と書き換えています。
質問
実際の所、このコードで動くのですが、リダイレクトURIにパラメーターを追加する方法でもっと良い方法があったりしますか?
現状の不満は、上記のコードをコピペして貼り付けた時に%26が&に変換されるときがあります。
あなたの回答
tips
プレビュー