-1
\$\begingroup\$

Is it possible to use JWT in my unity games?

I've read here that JWT needs .NET version 3.5+ and in Unity 5.4.1f1 the .NET version is "2.0.50727.1433". Is this information correct or incorrect?

If it is incorrect, can anyone point me to the right direction as to how I would go about implementing JWT in C#?

Sorry if I made any mistake, I'm completely new to JWT

\$\endgroup\$
0

1 Answer 1

1
\$\begingroup\$

afaik unity isn't currently capable of running on microsoft's own .NET framework, but rather uses mono an open clone of .NET

The version number you mentioned is the mono runtime version.

That version is roughly compatible with .NET 3.5

Whether or not you can run JWT will thus depend on whether you can compile and run the library you need on mono.

if there isn't any library that can actually decode / encode JWT requests and compiles / runs in mono, you'll have to write your own.

::update::

Looks like someone has done exactly that

https://github.com/monry/JWT-for-Unity

\$\endgroup\$
3
  • 1
    \$\begingroup\$ In Unity 2017 you can use the experimental .NET 4.6 compatible runtime, if the library doesn't work on 3.5. \$\endgroup\$ Commented Sep 24, 2017 at 0:46
  • \$\begingroup\$ At the time of this answer, that was an upcoming beta feature of unity (5.5) \$\endgroup\$ Commented Sep 25, 2017 at 7:33
  • 1
    \$\begingroup\$ I deleted this question before because I no longer need to use JWT in my game. However, the link you have provided in edit can be beneficial for anyone else stumbling upon this question. So I decided to un-delete this question and accept it as answer. Have a nice day. \$\endgroup\$ Commented Mar 25, 2019 at 4:32

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.