kuviman's blog

By kuviman, history, 8 months ago, In English

Hello everyone!

Today we announce that Codeforces now supports OpenID Connect — authentication protocol based on the OAuth 2.0. This allows third-party websites to implement logging in with Codeforces.

If you want to implement this for yourself, create an OAuth app in API settings.

Codeforces includes user's handle, current rating and avatar url as part of the id token.

Let us know if you hit any issues!

  • Vote: I like it
  • +834
  • Vote: I do not like it

»
8 months ago, hide # |
 
Vote: I like it +239 Vote: I do not like it

just doesnt feel the same as submitting a compilation error on problem 1789B

»
8 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

Why do you have 0 rating in the example instead of 2250?

  • »
    »
    8 months ago, hide # ^ |
     
    Vote: I like it +43 Vote: I do not like it

    screenshot is from local dev env where I have not solved a single problem. 0 is returned for unrated users

»
8 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Mhm.. This would replace submitting a compilation error on problem 1869/A

»
8 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

now logging in is constant time complexity

»
8 months ago, hide # |
 
Vote: I like it +29 Vote: I do not like it

This is good but I think Codeforces should also implement 2FA to make this feature more secure. Having only a password to secure the account is a bit inadequate when it is linked to other services.

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Is giving permission good or bad for us?

»
8 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it
»
8 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Is there any documentation to integrate this feature?

»
8 months ago, hide # |
 
Vote: I like it -21 Vote: I do not like it

Optimize the user experience in China 优化中国用户体验

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

does that mean we could revive the cf-tools somehow?

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

You should also add option to change username anytime! So, that we don't have to wait a whole year for it.

  • »
    »
    8 months ago, hide # ^ |
    Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    I think they are using it somewhere as a key for a key-value pair, that may be a good reason to not allow changing the username every time. I am assuming this though

»
8 months ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

I suggest Luogu admins consider using this to verify one's Codeforces account so we don't have to give away the password

»
8 months ago, hide # |
Rev. 2  
Vote: I like it -10 Vote: I do not like it

What is a uri, or do the developers want to say url ?

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

It is really awesome, now it would be easy to implement authentication in CF Battleground.

»
8 months ago, hide # |
 
Vote: I like it -17 Vote: I do not like it

Wow!!! Now, feeling like log in is just O(1) time complexity.

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

This is a really nice addition, thanks for rolling out OAuth / OIDC!

While you’re working on expanding the API surface, could you also consider exposing partial scoring details for IOI style problems in the API? Right now user.status and contest.status only return the overall points field (e.g. 55/100), but on the submission page you can click “Perfect result: 100 points” to see the full judgement protocol with subtasks and per-test breakdown. Having that information available via API would be super useful.

Would it be possible to add an endpoint or extend the existing Submission object to include this protocol (at least at the subtask level)?

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

is it possible to add email to the id token?

»
8 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can I create an OAuth App instance only for developing(i.e. in local network)?

»
2 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

It keeps returning a 401, regardless. Could you please fix it?