docs

Home All functions Legacy functions Categories

vuOAuthCompleteLogin()

vuOAuthCompleteLogin(*CSTRING Provider,*CSTRING AccountKey,*CSTRING CallbackText,*CSTRING OutText,LONG OutTextLen),SIGNED,PROC,PASCAL,RAW,NAME('vuOAuthCompleteLogin')

Purpose

Finalizes OAuth sign-in using callback data or verification result text and stores token state for later SMTP/POP3 use.

Parameters

| Parameter | Type | Description | |—|—|—| | Provider | *CSTRING | Provider identifier used in BeginLogin. | | AccountKey | *CSTRING | Account key used in BeginLogin. | | CallbackText | *CSTRING | Callback payload or verification completion text. | | OutText | *CSTRING | Output buffer receiving completion status text. | | OutTextLen | LONG | Size of OutText buffer in bytes. |

Return value / error codes

Example (Clarion)

MAP
  MODULE('vuMail.dll')
    vuOAuthCompleteLogin(*CSTRING Provider,*CSTRING AccountKey,*CSTRING CallbackText,*CSTRING OutText,LONG OutTextLen),SIGNED,PROC,PASCAL,RAW,NAME('vuOAuthCompleteLogin')
  END
END

rc           LONG
provider     CSTRING(64)
accountKey   CSTRING(128)
callbackData CSTRING(2048)
outText      CSTRING(2048)
outLen       LONG

provider     = 'Microsoft'
accountKey   = 'user@example.com'
callbackData = 'code=...&state=...'
outText      = ''
outLen       = SIZE(outText)

rc = vuOAuthCompleteLogin(provider, accountKey, callbackData, outText, outLen)
IF rc < 0
  MESSAGE('CompleteLogin failed: ' & rc & '| ' & outText)
END

Notes

Home All functions Legacy functions Categories