Giter VIP home page Giter VIP logo

oauth2-geocaching's Introduction

Geocaching Provider for OAuth 2.0 Client

Software License Total Downloads

This package provides Geocaching OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

Installation

To install, use composer:

composer require surfoo/oauth2-geocaching

Usage

Usage is the same as The League's OAuth client, using \League\OAuth2\Client\Provider\Geocaching as the provider.

Authorization Code Flow

Take a look at demo/index.php

Testing

$ ./vendor/bin/phpunit

License

The MIT License (MIT). Please see License File for more information.

oauth2-geocaching's People

Contributors

surfoo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

thn80

oauth2-geocaching's Issues

homeCoordinates

This is mostly an FYI.

It seems like the Geocaching side of oAuth has stopped returning homeCoordinates as a part of the data structure. By looking at your code I assume your tests will fail due to this.

I will try to ask them if it's intentional. The data can still be retrieved with the API method /v{api-version}/users/{referenceCode}. But in my case it means an extra http call upon every oauth. On the other hand I guess most API partners don't use the home coordinates for anything.

v1.4 vs v.2x

Hi.

Project-GC switched from its own oauth implementation to this a few years ago. As you probably know Geocaching.com is making several oAuth changes on the 1st of January 2024. Staging is already updated to that.

Since Project-GC is still using PHP 7.x and it's a major work task to upgrade to 8.x, and might even cause other issues, so you know if your 1.4 oauth version works with the coming changes?

I tried to update my code to authenticate against Staging to verify, but I am this far only getting a http code 500 on their end. Sadly I don't know if I missed changing something in my end or it's because oauth2-geocaching v1.4 is too old. It would have been wise if I tested it before they updated Staging as well.

TOKEN ENDPOINT values

the geocaching API, Paragraph TOKEN ENDPOINT tells about the response as a JSON construct with the four parts "access_token", "token_type", "expires_in" and "refresh_token".
How can I get the values for this?

refresh

Can you provide an example for refreshing the access token by means of the refresh_token ?

The access token seems to expire within a day.

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.