Closed h5aaimtron closed 5 years ago
I updated all the code and have the repos ready. Let me know if you want to proceed to create specific repos for them and what/if any naming you'd prefer.
Thanks for all that work over the weekend, @h5aaimtron. i'll clone your branch and give it a go and provided everything works just fine, I'd create an individual repo named sample_ChatWithAuthentication
(unless @davidfowl has another idea) in the SignalR org and stash it there.
Also - It'd be great to have a page that's rendered for the user to actually use the API and Hub. From what I can gather in your fork, there's no UI or anything for a user to use. A README.md on how to try the sample out, or a UI making it easy for a user to "clone, build, and see" it working would be optimal. Is that possible given your scenario?
@bradygaster, I put the UI in a separate repo here: https://github.com/h5aaimtron/sample_chatWithIdentityClient
It's a relatively basic Angular 6 app. I wasn't sure if/how you'd like them merged or separate.
I think it'd be ideal if it were all in one place. As in, if you had two top-level folders, one of which contained the API and SignalR Hub and supporting "stuff," and then the second top-level folder contained this repo's contents.
I think I can manage that tonight. Do you have a preferred repo name and/or top level folder name preference for the 2 folders?
Nothing fancy - "client" and "server" are fine. :)
https://github.com/h5aaimtron/sample_chatWithIdentity
Cleaned it up a little bit. Let me know if there is any additional work that needs to be done.
really good work on the readme and re-organization. cloning and trying it out now - sorry for the delay, was wrapped up in a few other items yesterday.
Thank you and no worries. I really like .NET Core and SignalR specifically, so I wanted to give back a little bit. If there are any questions or anything unclear, let me know.
@h5aaimtron - I tried things out. Followed instructions and immediately noticed this error in the client side. Very close! I'd also advise you draw out the logged-in user's name. Would make it more evident that it's multiple users for those who want to pop open multiple browsers to give it a spin. Here's the error i'm seeing when I run both the server and the client.
@bradygaster I'll look over the code and make the error messages more reasonable. I suspect that the account wasn't created and therefor the token endpoint actually returned a unauthorized error that the client interpreted incorrect. I'll tag you once the changes are committed.
@bradygaster I updated the sample to return better error messages when registering or signing in. They aren't perfect, but will tell you if a problem happened. I also added information to the readme that you would need to setup a SQL server or SQL Express connection in the appsettings.json so that the necessary identity tables can be generated. I'm not seeing any errors on my end when running it at this point, but will await your confirmation.
Sounds good @h5aaimtron - sorry i just caught this thread, had been heads-down on a few other tasks but will dive back in to this tonight and get you feedback by end-of-week. thanks for the persistence and passion!
@bradygaster wanted to check in on this as its been a few months. If there is anything you need on this sample, let me know, or if you're looking for other complex examples, I may be of help. I'm personally using SignalR Core 2.2 in a personal project similar to Discord with voice chat. I'm hoping to release it in a few months and will likely do a sample app with a simple WebRTC mesh network to put out there.
SignalR Core Chat Sample with Auth (JWT)