Callback

Callback called by Myinfo service

GET http://localhost:3001/callback

After login Myinfo and agree terms, Myinfo service automatically call myinfo-connector-python's callback API to pass auth code.

Query Parameters

NameTypeDescription

code*

String

The authcode given by myinfo's authorise API

state*

String

Identifier that represents the user's session/transaction with the client for reconciling query and response. The same value will be sent back via the callback URL. Use a unique system generated number for each user/transaction.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <span>Callback from Myinfo. Wait for calling person data API</span>
    <span id="code-container">{{ code }}</span>
</body>

<script>
    window.addEventListener('load',
        function (event) {
            let code_element = document.getElementById('code-container')
            let code_text = code_element.innerHTML

            let url = `http://localhost:3001/users/me/external/myinfo?code=${code_text}`
            window.location.href = url
        }
    );
</script>
</html>

Last updated