ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
ua__ has quit [Ping timeout: 256 seconds]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
ejjfunky has joined #crystal-lang
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 256 seconds]
waleee has quit [Ping timeout: 240 seconds]
Starfoxxes has quit [Ping timeout: 260 seconds]
Starfoxxes has joined #crystal-lang
ua_ has joined #crystal-lang
ur5us has joined #crystal-lang
ur5us_ has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
ur5us_ has quit [Ping timeout: 240 seconds]
ur5us_ has joined #crystal-lang
fifr_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
fifr has joined #crystal-lang
taupiqueur has joined #crystal-lang
ur5us_ has quit [Ping timeout: 240 seconds]
ua_ has quit [Ping timeout: 256 seconds]
ua_ has joined #crystal-lang
ua_ has quit [Ping timeout: 250 seconds]
ua_ has joined #crystal-lang
waleee has joined #crystal-lang
ua_ has quit [Ping timeout: 256 seconds]
ua_ has joined #crystal-lang
waleee has quit [Ping timeout: 240 seconds]
taupiqueur has quit [Quit: taupiqueur]
taupiqueur has joined #crystal-lang
waleee has joined #crystal-lang
waleee has quit [Ping timeout: 260 seconds]
notzmv has quit [Ping timeout: 240 seconds]
waleee has joined #crystal-lang
notzmv has joined #crystal-lang
<FromGitter> <raw-bin> Hi. Please see the following: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=621e3d99c61ef0178e51340a]
<FromGitter> <raw-bin> Shouldn't that work given that B is derived from A ? It worked for the first hash in line 5 above ?
<FromGitter> <raw-bin> Thanks
<FromGitter> <Blacksmoke16> the gist of it is that `{"B" => B.new}` is typed as `Hash(String, B)` and doesn't allow `A`. need to tell the compiler that it should also allow `A` types via `{"B" => B.new} of String => A`
<FromGitter> <moe:busyloop.net> i wonder if that is fixable. most of the time it can be worked around fairly easily. but sometimes it's very annoying.
taupiqueur has quit [Read error: Connection reset by peer]
taupiqueur has joined #crystal-lang
notzmv has quit [Ping timeout: 240 seconds]
<FromGitter> <raw-bin> Thanks both! I thought I was losing it! :)
<FromGitter> <raw-bin> Is this something that qualifies as a feature request ? Happy to follow any process/route if needed.
notzmv has joined #crystal-lang
<FromGitter> <oprypin:matrix.org> @raw-bin: this is well known, so unfortunately I have to say that another request on this topic would not be useful
<FromGitter> <raw-bin> Fair enough! Good to see it covered already.
taupiqueur has quit [Ping timeout: 240 seconds]
ejjfunky has quit [Ping timeout: 240 seconds]
taupiqueur has joined #crystal-lang
<FromGitter> <kingsleyh> anyone know how to get the location hash info in Kemal? I have a redirect coming to my endpoint and it has the data I want in the location hash e.g. http://localhost:3000/data#token=123
<FromGitter> <kingsleyh> I want to grab the token
<FromGitter> <kingsleyh> Kemal only seems to have params.url, params.json, params.query - which are all empty in my case
<FromGitter> <Blacksmoke16> pretty sure you cant because thats a fragment, not query param so its never sent to the server
<FromGitter> <Blacksmoke16> i.e. would need some JS or something
<FromGitter> <kingsleyh> ah I see - so I would have to catch it at the webfront end and not the Kemal server
<FromGitter> <Blacksmoke16> yes
<FromGitter> <kingsleyh> how inconvenient
<FromGitter> <Blacksmoke16> if you're doing an oauth flow, make sure you're doing the right one. afaik there's one that you get a token directly, whereas you want the one that gives an auth code
<FromGitter> <kingsleyh> I'm trying to do oauth with twitch
<FromGitter> <kingsleyh> so I can use it to fetch user details
<FromGitter> <kingsleyh> it says I need a token to make the request to the API to get the user details
<FromGitter> <Blacksmoke16> https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-authorization-code-flow prob want this one and not the implicit flow
<FromGitter> <kingsleyh> I see
<FromGitter> <kingsleyh> hmm
<FromGitter> <kingsleyh> I then have to make another call to get the token
<FromGitter> <Blacksmoke16> right
<FromGitter> <Blacksmoke16> tis how oauth works ;)
<FromGitter> <kingsleyh> the implicit one would be much easier if they put the token in a param and not a fragment tho hahahahaa
<FromGitter> <Blacksmoke16> the point of implicit flow is you're supposed to do it w/o a server
<FromGitter> <Blacksmoke16> i.e. all in the js
<FromGitter> <kingsleyh> yeah I read about it
<FromGitter> <kingsleyh> they have another thing as well as oauth
<FromGitter> <kingsleyh> OIDC
<FromGitter> <Blacksmoke16> going to run into the same problem afaik
<FromGitter> <kingsleyh> yeah it's the same
<FromGitter> <kingsleyh> but I think it returns some JWT with claims inside - but I think still easier to just get the token and call the users API
<FromGitter> <Blacksmoke16> the other catch is ofc that tokens expires and only way to get another is go thru oauth flow again
<FromGitter> <Blacksmoke16> so depending on your use case, that might be okay, or might not
<FromGitter> <kingsleyh> yeah is ok
<FromGitter> <kingsleyh> thanks for the help
ur5us_ has joined #crystal-lang
ur5us_ has quit [Ping timeout: 240 seconds]
ua_ has quit [Ping timeout: 252 seconds]
ua_ has joined #crystal-lang
FromGitter has quit [Ping timeout: 260 seconds]
FromGitter has joined #crystal-lang
ur5us_ has joined #crystal-lang
waleee has quit [Ping timeout: 256 seconds]
waleee has joined #crystal-lang
notzmv has quit [Ping timeout: 268 seconds]
Stephie- has joined #crystal-lang
Flipez1 has joined #crystal-lang
Flipez has quit [Ping timeout: 256 seconds]
Stephie has quit [Ping timeout: 256 seconds]
Flipez1 is now known as Flipez
taupiqueur has quit [Ping timeout: 240 seconds]
ur5us_ has quit [Ping timeout: 240 seconds]