Redirect to the referer url after mastofe authorization
This commit is contained in:
parent
e3ca9f708f
commit
325a268017
3 changed files with 90 additions and 6 deletions
|
|
@ -240,6 +240,16 @@ defmodule Pleroma.Factory do
|
|||
}
|
||||
end
|
||||
|
||||
def oauth_authorization_factory do
|
||||
%Pleroma.Web.OAuth.Authorization{
|
||||
token: :crypto.strong_rand_bytes(32) |> Base.url_encode64(padding: false),
|
||||
scopes: ["read", "write", "follow", "push"],
|
||||
valid_until: NaiveDateTime.add(NaiveDateTime.utc_now(), 60 * 10),
|
||||
user: build(:user),
|
||||
app: build(:oauth_app)
|
||||
}
|
||||
end
|
||||
|
||||
def push_subscription_factory do
|
||||
%Pleroma.Web.Push.Subscription{
|
||||
user: build(:user),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue