Coder Social home page Coder Social logo

autologin's Introduction

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

autologin's People

Contributors

ci-chrisjsimpson avatar dwightwatson avatar hongaar avatar mnabialek avatar mtrmakhil avatar pkunze avatar stealthangel avatar v-six avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autologin's Issues

Other Auth frameworks

Can we override the controller? That way we can enable Sentry or any other Auth strategy having the user ID and the redirect URL.

Database Migrations not published in L5

I've just found quite a minor issue. The Migrations aren't published by default, so that the Tables are missing on a virgin install.

Im not experienced in Package Dev but I suppose it could be solved by adding sth. like

$this->publishes([
    __DIR__.'/../database/migrations/' => base_path('/database/migrations')
], 'migrations');

to Watson\Autologin\AutologinServiceProvider->boot()

Hope this helps!

Can't connect anymore..

Hi,

Since the last commit, there seems to have a issue on the autoconnection.
None of our links redirects on the good address.

After looking for what's going on, i think it's coming in the AutologinController.php, in the autologin function. You check if there is a user returned by loginUsingId but in this function, you return Auth::login($user) which returns void. So when you test if there is a user connected, the good redirect is never called..

Could you check that please?
Thank you!

(Sorry for my english, i'm french..)

Expire after each use

Hello love your project and just wondering if there is a way to make each token expire once used?

I saw this part in the config:

    /*
    |--------------------------------------------------------------------------
    | Token destroy lottery
    |--------------------------------------------------------------------------
    |
    | You can clear the token on every use or adjust the chances the query will
    | be run. By default the odds are 1 out of 10.
    |
    */

    'lottery' => [1, 10],

And tried making the value [1, 1] which didn't work - is this what this config option was intended for. Or should I clone the Autologin Controller as you mentioned and run a delete request upon each usage.

Thank you

FatalErrorException in AutologinServiceProvider

I get a FatalErrorException within AutologinServiceProvider when I integrate Autoupdate freshly in my Laravel 5 app. I wasn't able to resolve the source of error so far, which is why i raise this issue here.

bildschirmfoto 2015-03-12 um 20 53 10

I have played around with some settings in the config-file (autologin.php), but as you might suspect, i was not able to solve this.

Some other information that might be helpful is that im using Entrust for roles and permission but no other package that is suspicious in this case.

These are all the packages included in my app (extract from my composer.json-file):

"require": {
    "laravel/framework": "5.0.*",
    "illuminate/html": "5.0.*",
    "filp/whoops": "~1.0",
    "zizaco/entrust": "dev-laravel-5",
    "watson/autologin": "0.3.*"
},
"require-dev": {
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1",
    "way/generators": "~3.0"
},

I hope that this is somewhat helpful. If you need any further information or if there is any other way how i could be helpful, please let me know! Thanks in advance!

Broken for 5.1

Using laravel 5.1 have error:
class 'Illuminate\Auth\Guard' does not have a method 'guard'

Using autologin only for a subset of routes?

I have security concerns using this for the whole application.

Say someone forwards accidentally an email with this link. Another person can login and change everything. So I want to use autologin only for a subset of links.

Is this provided here out of the box or do I have to write it myself?

e.g. say: to write a comment reply, you don't need to login correctly. To change the monthly membership of the user, you need to login properly

delete expire links

hi delete expire links not working for me

I set in config -> autologin.php => 'remove_expired' => true and 'lifetime' => 1440
but not working , what is problem ?

The Response content must be a string or object implementing __toString(), "object" given.

When calling the URL correctly:
/autologin/dG2SlV5DIoGCarhxqLaLWOWHBcE1rScLsGi25SXFIGRi9UmXRp
It returns this:

method.
     *
     * @param mixed $content Content that can be cast to string
     *
     * @return $this
     *
     * @throws \UnexpectedValueException
     */
    public function setContent($content)
    {
        if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable(array($content, '__toString'))) {
            throw new \UnexpectedValueException(sprintf('The Response content must be a string or object implementing __toString(), "%s" given.', gettype($content)));
        }
 
        $this->content = (string) $content;
 
        return $this;
    }
 
    /**
     * Gets the current response content.
     *
     * @return string Content
     */
    public function getContent()
    {
        return $this->content;
    }
 
    /**
     * Sets the HTTP protocol version (1.0 or 1.1).
     *

Just did all the things from the docs.

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.