/// <summary> /// Link a set of external auth credentials with an existing product user on the Epic Online Service /// </summary> /// <param name="options">structure containing a continuance token from a "user not found" response during Login (always try login first) and a currently logged in user not already associated with this external auth provider</param> /// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param> /// <param name="completionDelegate">a callback that is fired when the link operation completes, either successfully or in error</param> public void LinkAccount(LinkAccountOptions options, object clientData, OnLinkAccountCallback completionDelegate) { var optionsInternal = Helper.CopyProperties <LinkAccountOptionsInternal>(options); var completionDelegateInternal = new OnLinkAccountCallbackInternal(OnLinkAccount); var clientDataAddress = IntPtr.Zero; Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); EOS_Connect_LinkAccount(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsInternal); }
/// <summary> /// Link external account by continuing previous login attempt with a continuance token. /// /// On Desktop and Mobile platforms, the user will be presented the Epic Account Portal to resolve their identity. /// /// On Console, the user will login to their Epic Account using an external device, e.g. a mobile device or a desktop PC, /// by browsing to the presented authentication URL and entering the device code presented by the game on the console. /// /// On success, the user will be logged in at the completion of this action. /// This will commit this external account to the Epic Account and cannot be undone in the SDK. /// </summary> /// <param name="options">structure containing the account credentials to use during the link account operation</param> /// <param name="clientData">arbitrary data that is passed back to you in the CompletionDelegate</param> /// <param name="completionDelegate">a callback that is fired when the link account operation completes, either successfully or in error</param> public void LinkAccount(LinkAccountOptions options, object clientData, OnLinkAccountCallback completionDelegate) { System.IntPtr optionsAddress = new System.IntPtr(); Helper.TryMarshalSet <LinkAccountOptionsInternal, LinkAccountOptions>(ref optionsAddress, options); var clientDataAddress = System.IntPtr.Zero; var completionDelegateInternal = new OnLinkAccountCallbackInternal(OnLinkAccountCallbackInternalImplementation); Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal); EOS_Auth_LinkAccount(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal); Helper.TryMarshalDispose(ref optionsAddress); }
private static extern void EOS_Connect_LinkAccount(IntPtr handle, ref LinkAccountOptionsInternal options, IntPtr clientData, OnLinkAccountCallbackInternal completionDelegate);
internal static extern void EOS_Auth_LinkAccount(System.IntPtr handle, System.IntPtr options, System.IntPtr clientData, OnLinkAccountCallbackInternal completionDelegate);