Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token Authentication through Blueprint #355

Open
D3valon opened this issue Nov 24, 2022 · 4 comments
Open

Token Authentication through Blueprint #355

D3valon opened this issue Nov 24, 2022 · 4 comments

Comments

@D3valon
Copy link

D3valon commented Nov 24, 2022

image
image
Hi everyone,
First of all thank you for this great plugin,
I am having some issue connecting to the server if I am trying to connect manually from an event blueprint through Connect. On the other hand if I input the same values and try to use auto connect, I have a successful connection. What am I missing in the in the bp event?
--UPDATE--
So it seems if I call event after an Event BeginPlay it works, however if I try to add it to an input event it does not.
--UPDATE 2--
As of now I am able to control when to connect via spawning a new Actor with only a SocketIO component added to it and running the "Connect" from there on event begin play, but not sure if this is the best way to do it.
Thanks

@getnamo
Copy link
Owner

getnamo commented Nov 27, 2022

Disable should auto connect if you want to control when the connection happens manually

@D3valon
Copy link
Author

D3valon commented Nov 27, 2022

If I disable "Should Auto Connect" I am still not able to connect with my BP_Connect event firing on a key input, to a URL where authentication is required, but if I am connecting to a URL where authentication is not needed, it works. I don't know if any of you can replicate this behavior? Thanks

@getnamo
Copy link
Owner

getnamo commented Nov 27, 2022

Hmm that sounds like a bug, will need to check the native functions to see what's going on, will try to sweep bug fixes next week, if you need it sooner, dive into FSocketIONative code and trace calls in the two scenarios to find where the code diverges.

@D3valon
Copy link
Author

D3valon commented Nov 28, 2022

image
I might have found the problem, which was probably due to how things were implemented in the project, it looks like this function was executing at begin play, and "BP_Connect" was executed after this, without any success if we used authentication.
Removing "Bind event to Function" solved my problem and now I can connect to URL with authentication on a key press whenever I want.
So I consider this fixed in my case.
Although I am not sure if the "Bind event to Function" is behaving as intended if it is executed before Connect is called.
Thanks for the help @getnamo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants