Giter Site home page Giter Site logo

Comments (7)

adamwathan avatar adamwathan commented on September 28, 2024

Hey just wanted to let you know this didn't go unnoticed, but haven't had time yet to give it a full look! It's on my to do list though :) Thanks!

from eloquent-oauth.

rvanbaalen avatar rvanbaalen commented on September 28, 2024

@adamwathan Your package looks exciting to use but it seems like you haven't had/made much time to maintain it lately.

Would you recommend using your package or is there a better/newer version available? I'd like to extend this package with Trello support.

from eloquent-oauth.

adamwathan avatar adamwathan commented on September 28, 2024

@rvanbaalen I'm still using it myself but haven't had much stuff I've needed to do on it.

All of the providers have been split out into packages like this: https://github.com/adamwathan/socialnorm-facebook

I'd like to honestly collapse them all into one repo but setup a git subtree split deal to break them off into different packages as part of a build process so that it's easy for people to submit new providers to one repo, but just haven't gotten around to it :(

If you'd like to add Trello support, you can actually do it without changing this package. Just create a new provider in your own namespace and register it with the OAuthManager in a service provider and it'll become available πŸ‘

If you happen to know anything about git subtree or feel like learning (https://makingsoftware.wordpress.com/2013/02/16/using-git-subtrees-for-repository-separation/) I would be happy to collaborate on making it easier to get new providers added to the ecosystem :)

from eloquent-oauth.

rvanbaalen avatar rvanbaalen commented on September 28, 2024

Thanks for the fast reply! Sorry to hijack this topic though. Probably should start a new issue to discuss this. How exactly do I go about registering my own provider with your OAuthManager? Do you perhaps have an example somewhere?

from eloquent-oauth.

adamwathan avatar adamwathan commented on September 28, 2024

@rvanbaalen it appears not! But it would look something like this if you base your Trello provider on the base OAuth2Provider:

// RobinsAwesomeServiceProvider.php

public function boot()
{
    $this->app['adamwathan.oauth']->registerProvider('trello', $this->app[TrelloProvider::class]);
}

public function register()
{
    $this->app->singleton(TrelloProvider::class, function ($app) {
        $config = $app['config']['eloquent-oauth.providers.trello'];
        $httpClient = new GuzzleHttp\Client;
        $request = new SocialNorm\Request($app['request']->all());
        return new TrelloProvider($config, $httpClient, $request);
    });
}

// TrelloProvider.php

class TrelloProvider extends SocialNorm\Providers\Auth2Provider
{
    // Implement abstract methods and stuff, see any of the other providers for
    // a good starting point.
}

from eloquent-oauth.

rvanbaalen avatar rvanbaalen commented on September 28, 2024

Great! Thanks Ill keep you updated on the progress.

Trello is a bit funky woth their OAuth implementation so this will be quite the challenge.

By the way, do you use OAuth2 by default? Trello uses OAuth1 I believe.


This email was sent from my iPhone and therefore subject to typos and other inaccuracies.

On 2 okt. 2015, at 14:59, Adam Wathan [email protected] wrote:

@rvanbaalen it appears not! But it would look something like this if you base your Trello provider on the base OAuth2Provider:

// RobinsAwesomeServiceProvider.php

public function boot()
{
$this->app['adamwathan.oauth']->registerProvider('trello', $this->app[TrelloProvider::class]);
}

public function register()
{
$this->app->singleton(TrelloProvider::class, function ($app) {
$config = $app['config']['eloquent-oauth.providers.trello'];
$httpClient = new GuzzleHttp\Client;
$request = new SocialNorm\Request($app['request']->all());
$trelloProvider = new TrelloProvider($config, $httpClient, $request);
return
});
}

// TrelloProvider.php

class TrelloProvider extends SocialNorm\Providers\Auth2Provider
{
// Implement abstract methods and stuff, see any of the other providers for
// a good strating point
}
β€”
Reply to this email directly or view it on GitHub.

from eloquent-oauth.

adamwathan avatar adamwathan commented on September 28, 2024

Ah, yeah everything in this package is OAuth 2. I have yet to try to implement an OAuth 1 provider, it might not be possible :(

from eloquent-oauth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.