difference between OAuth2 and Omniauth

Fran Martinez

I've read a lot about Omniauth and OAuth2, and how Omniauth uses OAuth, but I don't really understand what is the aim for each one.

For example, I know that with Omniauth I can get back sent params with

@auth['omniauth.params']

but if I'm using OAuth, without Omniauth, can I do the same?

My real problem is that I don't understand the difference between them, where Omniauth ends and OAuth starts, and what can I do with Omniauth that is not possible with OAuth.

pjmorse

In this answer, I'm assuming you're using Rails (or some other Rack-based framework), because Omniauth doesn't make much sense without that.

Start with OAuth2. OAuth is a system for authorizing a user on one site using their authentication on another site. OAuth itself describes the system by which this is managed, but it does not specify the code the sites use to carry it out. (This means, for example, a PHP-based site could use a Ruby-based site as a provider, and not need to know what's happening behind the scenes at the provider.)

This is where Omniauth comes in. Omniauth is a package for supporting decentralized authentication in Rack-based sites. OAuth2 is one of the protocols it supports for handling this, and it incorporates a class named OAuth2 which is a Ruby implementation of the OAuth2 specification. You can think of Omniauth as a wrapper around OAuth2 which handles the details of the protocol without bothering you too much with them.

You could use the OAuth2 gem/class without using Omniauth, and deal with the specifics of authenticating over OAuth2 yourself, but I'm not sure why.

As far as what you can do with Omniauth that isn't possible with OAuth, most of it is authenticating with other non-OAuth services (Omniauth allows the use of community-built "strategies" for authenticating to e.g. Stack Exchange).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

difference between OAuth2 and Omniauth

From Dev

Handling OmniAuth::Strategies::OAuth2::CallbackError in OmniAuth

From Dev

Difference between client_id and client_secret OAuth2 &OAuth flows types

From Dev

Difference between client_id and client_secret OAuth2 &OAuth flows types

From Dev

OAuth2: What is the difference between the JWT Authorization Grant and Client Credentials Grant with JWT client authentication?

From Dev

Omniauth and google oauth2 error without Devise - Rails 4

From Dev

Google oauth2 with devise and omniauth processed as failure

From Dev

Getting "Authentication failure! invalid_credentials: OAuth2::Error" for custom omniauth strategy

From Dev

Difference between v1, v2 and v3 in https://www.googleapis.com/oauth2/v3/certs

From Dev

Difference between these 2 codes?

From Dev

Difference between "//" and "/" in Python 2

From Dev

Difference between 2 strings

From Dev

Difference between these 2 selectors?

From Dev

Difference between 2 commands

From Dev

The difference between these 2 strings?

From Dev

Is there a difference between these 2 arrays?

From Dev

Stuck between two errors in an Azure OAuth2 token request

From Dev

Google Oauth Login with omniauth-google-oauth2 failed frequently

From Dev

difference between (int *) (&a[2]) and *(&a[2])

From Dev

Difference between `[[ $a -lt 2 ]]` and `(( $a < 2 ))`

From Dev

what is the difference between >&2 and &>2

From Dev

Lisp: difference between 2 and (2)

From Dev

Month difference between 2 dates

From Dev

difference between %20 and %2 in url

From Dev

AngularJS difference between 2 dates

From Dev

Difference between 2 dates in quarters

From Dev

Difference between 2 time() values

From Dev

What is the difference between these 2 structures

From Dev

Difference between char* and char[] (2)

Related Related

  1. 1

    difference between OAuth2 and Omniauth

  2. 2

    Handling OmniAuth::Strategies::OAuth2::CallbackError in OmniAuth

  3. 3

    Difference between client_id and client_secret OAuth2 &OAuth flows types

  4. 4

    Difference between client_id and client_secret OAuth2 &OAuth flows types

  5. 5

    OAuth2: What is the difference between the JWT Authorization Grant and Client Credentials Grant with JWT client authentication?

  6. 6

    Omniauth and google oauth2 error without Devise - Rails 4

  7. 7

    Google oauth2 with devise and omniauth processed as failure

  8. 8

    Getting "Authentication failure! invalid_credentials: OAuth2::Error" for custom omniauth strategy

  9. 9

    Difference between v1, v2 and v3 in https://www.googleapis.com/oauth2/v3/certs

  10. 10

    Difference between these 2 codes?

  11. 11

    Difference between "//" and "/" in Python 2

  12. 12

    Difference between 2 strings

  13. 13

    Difference between these 2 selectors?

  14. 14

    Difference between 2 commands

  15. 15

    The difference between these 2 strings?

  16. 16

    Is there a difference between these 2 arrays?

  17. 17

    Stuck between two errors in an Azure OAuth2 token request

  18. 18

    Google Oauth Login with omniauth-google-oauth2 failed frequently

  19. 19

    difference between (int *) (&a[2]) and *(&a[2])

  20. 20

    Difference between `[[ $a -lt 2 ]]` and `(( $a < 2 ))`

  21. 21

    what is the difference between >&2 and &>2

  22. 22

    Lisp: difference between 2 and (2)

  23. 23

    Month difference between 2 dates

  24. 24

    difference between %20 and %2 in url

  25. 25

    AngularJS difference between 2 dates

  26. 26

    Difference between 2 dates in quarters

  27. 27

    Difference between 2 time() values

  28. 28

    What is the difference between these 2 structures

  29. 29

    Difference between char* and char[] (2)

HotTag

Archive