jiachengzhang1 / Umbrella.jl

A Simple Authentication plugin for any Web Frameworks in Julia
https://jiachengzhang1.github.io/Umbrella.jl
MIT License
15 stars 4 forks source link

Parsing error while processing github callback #6

Open edyu opened 1 year ago

edyu commented 1 year ago
┌ Error: Unable to complete token exchange
│   exception =
│    ArgumentError: invalid JSON at byte position 924 while parsing type Bool: InvalidChar
│    "","email":"","hireable":"","bio":"","twitter_usern
│
│    Stacktrace:
│      [1] invalid(error::JSON3.Error, buf::Base.CodeUnits{UInt8, String}, pos::Int64, T::Type)
│        @ JSON3 ~/.julia/packages/JSON3/CpNms/src/JSON3.jl:30
│      [2] read(::StructTypes.BoolType, buf::Base.CodeUnits{UInt8, String}, pos::Int64, len::Int64, b::UInt8, ::Type{Bool}; kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
│        @ JSON3 ~/.julia/packages/JSON3/CpNms/src/structs.jl:171
│      [3] read
│        @ ~/.julia/packages/JSON3/CpNms/src/structs.jl:156 [inlined]
│      [4] #_#45
│        @ ~/.julia/packages/JSON3/CpNms/src/structs.jl:447 [inlined]
│      [5] MutableClosure
│        @ ~/.julia/packages/JSON3/CpNms/src/structs.jl:445 [inlined]
│      [6] applyfield!
│        @ ~/.julia/packages/StructTypes/AK4aM/src/StructTypes.jl:821 [inlined]
│      [7] #read!#48
│        @ ~/.julia/packages/JSON3/CpNms/src/structs.jl:512 [inlined]
│      [8] read!
│        @ ~/.julia/packages/JSON3/CpNms/src/structs.jl:462 [inlined]
│      [9] #read#46
│        @ ~/.julia/packages/JSON3/CpNms/src/structs.jl:454 [inlined]
│     [10] read
│        @ ~/.julia/packages/JSON3/CpNms/src/structs.jl:452 [inlined]
│     [11] read(str::String, ::Type{Umbrella.GitHub.User}; jsonlines::Bool, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
│        @ JSON3 ~/.julia/packages/JSON3/CpNms/src/structs.jl:40
│     [12] read
│        @ ~/.julia/packages/JSON3/CpNms/src/structs.jl:32 [inlined]
│     [13] _get_user(url::String, access_token::String)
│        @ Umbrella.GitHub ~/.julia/packages/Umbrella/oSk8X/src/providers/GitHub.jl:200
│     [14] token_exchange(code::String, config::Umbrella.Configuration.Options)
│        @ Umbrella.GitHub ~/.julia/packages/Umbrella/oSk8X/src/providers/GitHub.jl:188
│     [15] (::Umbrella.var"#2#4"{Umbrella.Configuration.Options, typeof(Umbrella.redirect), Dict{Symbol, Function}})(code::String, verify::Main.Api.var"#100#110")
│        @ Umbrella ~/.julia/packages/Umbrella/oSk8X/src/initiator.jl:65
edyu commented 1 year ago

I'm fairly certain this is a bug in the github portion of the code as the google one works fine.