OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to navigate to a specific page

  • Thread starter Thread starter car
  • Start date Start date
C

car

Guest
(use svelte and spring-boot) I'm creating a Find ID screen.

  1. In the "Find ID screen", the user enters the account information
  2. Click the OK button to check the data to see if you actually have an account.
  3. If the data match, go to the "ID Results Screen" with the id value.

Number 3 is the problem.

Code:
goto('/login/viewId?loginId=${loginId}`)

in the same manner as above I put the id in the url and sent it to the result screen. But I found out that id shouldn't be exposed to url.

As you move to a specific page, the url has a parameter value Is there any way to make it so that it doesn't expose it?

I wonder if the controller should do the redirection.

(This is the code you wrote.)

Code:
    async function findId() {
        const formData = new FormData(document.getElementById('Form'));

            const response = await Api.post(`/login/IdCheck`, formData); // 1. ID Check
            if (response.data.resultCode == 'success') {
                var loginId = response.data.findInfo.loginId;

                goto(`./Id/IdDisplay?Id=${Id}`);// 2.Query String NO....
     
    }

How to navigate to a specific page

<p>(use svelte and spring-boot)
I'm creating a Find ID screen.</p>
<ol>
<li>In the "Find ID screen", the user enters the account information</li>
<li>Click the OK button to check the data to see if you actually have an account.</li>
<li>If the data match, go to the "ID Results Screen" with the id value.</li>
</ol>
<p>Number 3 is the problem.</p>
<pre><code>goto('/login/viewId?loginId=${loginId}`)
</code></pre>
<p>in the same manner as above
I put the id in the url and sent it to the result screen.
But I found out that id shouldn't be exposed to url.</p>
<p>As you move to a specific page, the url has a parameter value
Is there any way to make it so that it doesn't expose it?</p>
<p>I wonder if the controller should do the redirection.</p>
<p>(This is the code you wrote.)</p>
<pre><code> async function findId() {
const formData = new FormData(document.getElementById('Form'));

const response = await Api.post(`/login/IdCheck`, formData); // 1. ID Check
if (response.data.resultCode == 'success') {
var loginId = response.data.findInfo.loginId;

goto(`./Id/IdDisplay?Id=${Id}`);// 2.Query String NO....

}
</code></pre>
<p>How to navigate to a specific page</p>
 
Top